jinger
11-28-2003, 04:23 AM
hi, :D
i have a search engine tat is able to search in mysql database for by the file description , but i want to add an additional feature tat is able to search for the file_name as well..
i tried adding the file_name field name into the condition query below with the OR CLAUSE, but alot of irrelvent results would appear. the same file will be listed out more than once.
codes:
select file_group_url.g_url,
file_record.file_desc,
file_record.file_name,
date_format(file_record.file_date_create,'%w-%m-%y'),
file_group_url.g_groupfrom file_record,
file_group_url
where file_record.G_id = file_group_url.G_id
and file_record.File_desc like'%'(user_id session value)
or file_record.File_name like'%'(user_id session value)
can anyone help to tell me how to correct the sql queries..
thanks in advance!
i have a search engine tat is able to search in mysql database for by the file description , but i want to add an additional feature tat is able to search for the file_name as well..
i tried adding the file_name field name into the condition query below with the OR CLAUSE, but alot of irrelvent results would appear. the same file will be listed out more than once.
codes:
select file_group_url.g_url,
file_record.file_desc,
file_record.file_name,
date_format(file_record.file_date_create,'%w-%m-%y'),
file_group_url.g_groupfrom file_record,
file_group_url
where file_record.G_id = file_group_url.G_id
and file_record.File_desc like'%'(user_id session value)
or file_record.File_name like'%'(user_id session value)
can anyone help to tell me how to correct the sql queries..
thanks in advance!