The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

OR problem

Hi,

I need some help with this query:

SELECT *
FROM myTable
WHERE active = '1'
OR fname LIKE '%#FORM.search#%'
OR sname LIKE '%#FORM.search#%'
OR company LIKE '%#FORM.search#%'

I would like to select all records which have an active setting of 1 and match the form search submission. The problem is its selecting anything with an active status of 1 or a match to the form search submission.

Formpage validation returns an auto respond email

I have a similar problem and I hope it's okay for me to continue on this thread and get some answers regarding PHP and MySQL functions. So with all respect may I ask if you know how to solve this:

Question 1: If the validation of ENUM return a value of =0 from my select query,
I want to send out an auto respond email. Based on this =0 result to those clients who haven't complete their submission.

Question 2, is totally another issue but I give you a chance to figure this one out aswell: When I submit my form and save the info to the database and if it still missing information in certain fields. I want it to send an auto responded email request to the client and inform them that certain information is missing and needs to be send in for a complete submission.

wow..hhu..headache.. did you got that? Can't explain it more clear than this.
Any help would be much appreciated or any ideas that pointing in right direction. Thanks
/rz

Dave
The reason why I decided to put it in a new post was that the issue I have was slightly different than other one. I'm sorry I didn't saw your respond on this one before I did my last post in my own thread.
Anyway this looks great. I really appreciate that you take your time and help me out. I'll try this and post the result.
/rz