Mysql Rows
| From: | benifactor | Date: | Fri, 03 Mar 2006 23:51:00 +0000 |
| Subject: | Mysql Rows | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-231425@lists.php.net to get a copy of this message | ||
i need to find a way to find out what number of a row is in a database...
for example:
//this is the database
Username: Chuck Password: adsasa
Username: jimmy Password: adsf
Username: stewart Password: dfds
the information i need is what row jimmy resides on..
this is what i tried:
function i_gun ($user) {
global $username;
$gun = mysql_query("select * from users");
while ($d = mysql_fetch_array($gun)) {
while($d[username] != $user) {
$i = $i + 1;
}
}
}
but it always returns 1. can sombody tell me what i am doing wrong or point me in the right
direction in the manual? plase and thank you