query question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux