mysql connection & resource types
Posted: Fri Nov 11, 2005 12:18 pm
Code: Select all
$link_id = @mysql_query($sql);A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$link_id = @mysql_query($sql);Code: Select all
if (!$link)
{
echo "uh oh. this did not work..damn..";
}
else
{
echo "yay.it worked.";
}Code: Select all
if(mysql_query($sql)){
//yay it worked
}
else{
//damn I suck
}Code: Select all
function mybooleanfunc () {
if (rand() > 0.5) return true;
else return false;
}
/************************/
if (mybooleanfunc()) echo "yes";
else echo "no";
//is equivalent to:
$foo = mybooleanfunc();
if ($foo) echo "yes";
else echo "no";Thank you.redmonkey wrote:Without a resource link indentifier, you will have no way of discovering stats for your query. i.e. Issue a select query then tell me how many rows are in that select query?