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
SELECTfile_titleFROMuploadsWHEREstringLIKE%ab383292%``
but i got the following error:
#1054 - Unknown column '%ab383292%' in 'where clause'

Member Avatar for diafol

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%'

diafsol
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 for diafol

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.