I am currently working on a php site that pulls in data from a MySql server, Unfortunately the code I'm using to run the query to get the data from the server is causing a nasty parse error on my site, and I am having extreme dificulty sorting it out. Here is my code

$q = = 'SELECT Customers.CustomerID, Customers.OldCustomerID, CONCAT_WS(Lastname, FirstName, MiddleName ) AS CustomerName, CONCAT( LEFT( FirstName, 1 ) , LEFT( MiddleName, 1 ) , LastName ) AS UserName, Customers.IsLaptop AS Laptop, zlu_BirthMonth.Description AS BirthMonth, zlu_Residence.Description AS Residence, zlu_CarColor.Description AS CarColor, zlu_Cars.Description, zlu_Computers.Description AS Computer, zlu_Race.Description AS Race
FROM zlu_Residence INNER JOIN (zlu_Race INNER JOIN (zlu_Computers INNER JOIN (zlu_Cars INNER JOIN (zlu_CarColor INNER JOIN (zlu_BirthMonth INNER JOIN Customers ON zlu_BirthMonth.BirthMonthID = Customers.BirthMonthID) ON zlu_CarColor.CarColorID = Customers.CarColorID) ON zlu_Cars.CarsID = Customers.CarID) ON zlu_Computers.ComputersID = Customers.ComputerID) ON zlu_Race.RaceID = Customers.RaceID) ON zlu_Residence.ResidenceID = Customers.ResidenceID
WHERE customerID >=500
AND CustomerID <=600[...]';

Any help would be greatly appreciated

Recommended Answers

All 2 Replies

You only need one '=' sign if you are assigning the string to the variable $q.

Remove one '=' Sign after $q from Your Code.

If Your Problem is Solved Then MArk This Thread to Solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.