Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats is wrong with the following code

Status
Not open for further replies.
Try this...

if ($criteria != 0){
$string="SELECT * FROM `orders` where `status` ='" . $criteria . "' LIMIT $start, $numentries";
echo "$criteria";
}
 
or:
if ($criteria != "")


Known is handfull, Unknown is worldfull
 
rninja has the right answer.

You typed "if ($criteria =! 0)". The inner part of the if says "assign the value of 'not zero' to $criteria" and "not zero" evaluates to, you guessed it... one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top