"Aaron Axelsen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Yes, connect.inc.php does the following: > > @$connect=mysql_connect("localhost",$dbuser,$dbpass); > if (!$connect) { > echo "Could not connect to mysql!"; > exit(); > } > > @$db=mysql_select_db($dbname); > if (!$db){ > echo "Could not connect to database"; > exit (); > } > > @$result=mysql_query($sql); > if (!$result){ > echo "Invalid Sql Command"; > exit (); > } > > > - --- > Aaron Axelsen > AIM: AAAK2 > Email: [EMAIL PROTECTED] > > Want reliable web hosting at affordable prices? > www.modevia.com > > Web Dev/Design Community/Zine > www.developercube.com
The resource identifier returned by mysql_connect() is an optional input to the mysql_query() function. You should test it out to see if your system isn't passing the value automatically. $result = mysql_query($sql, $connect); //<-- like this The reason you may be seeing 1 instead of the value you expected is that the mysql_query() function can return True even if it doesn't succesfully execute the query. In that case you may see the output 1 becuase the boolean True evaluates to 1 in the parser. -- Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php