By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,227 Members | 1,025 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,227 IT Pros & Developers. It's quick & easy.

How to make a Query with diffrent variables, beeing empty or not?

P: n/a
Hello all, im new here so bare with me ;)

This is what i have:

$queryzoeken = ("SELECT SNR, SNM, SOMS, SVER, SSER, SLEV, SLIC, SLM
FROM software
WHERE SNR = $array[snr]

(!!if $array[snr is filled in then also look use it in the query!!)

AND snm = $array[snr]");
$result = mysql_query( $queryzoeken);

Explanation: User inputs one or more of these variables:
$array[snr]
$array[snm]
etc.
I need the server to look up the query with tha variables the use has
filled in, and leave out the ones that are empty.

Can anyone help me out with this?

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.