mysql query - WHERE ... AND WHERE possible?
Posted: Wed May 21, 2003 4:45 am
I am quite desperately trying to do a query like that:
$row and $column contain a number, row and column fields are tinyint, filled with numbers between 0 and 63, unique, null and default NULL
first of all, is it possible at all to do a WHERE AND WHERE or is it some other operator or something i really don't know what else to try, tried about every way to write it and searched for code snippets and all but couldn't find anything... plz help!
Code: Select all
<?php
$query = "SELECT * FROM chess_1 WHERE row='$row' AND column='$column'";
$result = mysql_query($query, $connection) or die('error making query');
for ($b=0;$b<5;$b++)
{
$row = mysql_fetch_row($result);
}
?>first of all, is it possible at all to do a WHERE AND WHERE or is it some other operator or something i really don't know what else to try, tried about every way to write it and searched for code snippets and all but couldn't find anything... plz help!