views:

110

answers:

4
+1  A: 

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.

r0ash
Attached describe table results
gAMBOOKa
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
which mySQL version you are running?
r0ash
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
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
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