Page 1 of 1

SQL: Error in Query

Posted: Tue Dec 12, 2006 5:38 am
by mohson
I get the following error.

Error in query: Unknown table 'c' in field list

the table is called cpanel, previousy I've used the first letter in the tables name to recognise it but in this case its not accepting it?

Code: Select all

$query = 	"SELECT 
		 
c.person_id,c.salutation,c.firstname,c.surname,c.email,c.organisation,c.address,c.address1,
c.telephone,c.primarycontact,c.cpreg,c.cpint,c.org_id,o.org_id
	
FROM cpanel f LEFT JOIN organisations o 
ON o.org_id = c.org_id
ORDER BY name ASC ";

Posted: Tue Dec 12, 2006 5:39 am
by itsmani1
you table c is missing, you need to give c table name

Apologies

Posted: Tue Dec 12, 2006 5:39 am
by mohson
Apologies I didnt notice the f My Mistake.