The query is perfectly alright mySQL 5.0.18-nt-log. Such error will be prompted only when the field does not exist, in case double check your column name image_id in bgy_users table.
+1
A:
r0ash
2009-11-03 05:39:44
Attached describe table results
gAMBOOKa
2009-11-03 06:24:16
if you are working in development + production environment then do check your database connection string. Again, query is okay, might be you are running correct query on a database that does not have column image_id in bgy_users table
r0ash
2009-11-03 06:28:44
which mySQL version you are running?
r0ash
2009-11-03 06:35:49
A:
try this
SELECT u.user_id, u.first_name, u.last_name, i.path AS image_path
FROM (bgy_users u)
LEFT JOIN (bgy_images i) ON i.image_id = u.image_id
WHERE u.commentary_id = '0'
the only difference is the parenthesis around table names
Marek Karbarz
2009-11-03 06:29:08
A:
Can you do a
select image_id from bgy_users;
I am asking because the only time I have seen anything like this it has either been a code page problem or there have been non printable characters creeping into your query.
James Anderson
2009-11-03 06:35:59
A:
This is real weird and the only thing I can think of is that you are querying the wrong database. Confirm in your application code that you are using correct connection string to connect to the database.
You can also issue 'select database()' from your application to find out the name of the current database you are connected to.
Kailash Badu
2009-11-03 06:51:58