query question
| From: | 2b4ever php | Date: | Tue, 25 Mar 2003 11:40:31 +0000 |
| Subject: | query question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-26614@lists.php.net to get a copy of this message | ||
heyas all,
the database:
KID MID
1 1
1 2
2 2
I have the following code:
$PID = 1;
$UID = 2;
$res = mysql_query("SELECT KID FROM kpr WHERE MID = '$PID' OR MID = '$UID'") or die (mysql_error());
$values = (array_values(mysql_fetch_array($res)));
for ($i=; $i <= count($values); $i++){
print ("($i) $values$i] <br>\n");
}
problem:
If i use option 1 i get the following result:
(0) 1
(1) 1
What i expected was:
(0) 1
(1) 1
(2) 2
anyone knowz why i don't get that result?
TIA