Need some help creating a query
Posted: Mon Jun 04, 2007 10:24 am
Hi,
I'm currently trying to create a query to do a lookup based on key words and location.
I have the following fields in my database:
`cust_db`.`id`,
`cust_db`.`comp_name`,
`cust_db`.`comp_url`,
`cust_db`.`comp_logo`,
`cust_db`.`state`,
`cust_db`.`products`,
I want to create a form to do a lookup by keyword or by state. I've done that part making the location a drop down box, however, I don't really know where to begin in creating the php search query.
I've made the products field a full text field and entered data such as: lcd, laptop, desktop etc into multiple rows.
I want to be able to search by keyword or state, there if keyword is left blank, it'll pull up the result based on location and vice versa.
I would like to display the results in the following order:
comp_logo
comp_name
comp_url
products
state
for each result.
Can someone point me in the right direction?
Thanks in advance.
I'm currently trying to create a query to do a lookup based on key words and location.
I have the following fields in my database:
`cust_db`.`id`,
`cust_db`.`comp_name`,
`cust_db`.`comp_url`,
`cust_db`.`comp_logo`,
`cust_db`.`state`,
`cust_db`.`products`,
I want to create a form to do a lookup by keyword or by state. I've done that part making the location a drop down box, however, I don't really know where to begin in creating the php search query.
I've made the products field a full text field and entered data such as: lcd, laptop, desktop etc into multiple rows.
I want to be able to search by keyword or state, there if keyword is left blank, it'll pull up the result based on location and vice versa.
I would like to display the results in the following order:
comp_logo
comp_name
comp_url
products
state
for each result.
Can someone point me in the right direction?
Thanks in advance.