hi i have a table in which m storing some data like in the following:

table => uploads
string_file and file_name

and m trying to select the string_file. the data for this column is like in the following;
ab323892,416a75f4, e732ced3 and blah blah.
and following is the query that m trying to access the data
but i got the following error:
#1054 - Unknown column '%ab383292%' in 'where clause'

Recommended Answers

Post your table name and fieldnames

Jump to Post

All 4 Replies

Member Avatar

Post your table name and fieldnames

Why does your query not have any spaces between words? Also, values should be quoted to stop MySQL treating them as table fields.

SELECT `file_title` FROM `uploads` WHERE `string_file` LIKE '%ab383292%'

here i have the following iformation for table
name => uploads
fields are in the following:
id -> primary key
uploaded_by -> varchar
string -> varchar
file_title -> varchar
file_size -> varchar
file_path -> varchar

Member Avatar

Lik bb says, e.g.:

SELECT `file_title` FROM `uploads` WHERE `string` LIKE '%ab383292%'
Be a part of the DaniWeb community

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