Database Array Question

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

 



I'm new to PHP and was wondering if there's any better way of retrieving the records from the query other than using an array (This query will only return 1 row):

$auth = mysql_query("SELECT username, userlevel, password, email FROM users WHERE id = '".$_SESSION['uid']."'");
while ($row = mysql_fetch_array($auth))
{
$password = $row['password'];
}



Also, can anyone tell me what the relevance of adding '!' is to an if statement eg.


This:
if(!isset($_SESSION['uid']))

Instead of this:
if(isset($_SESSION['uid']))


Thanks -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
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