bftwofreak Posted September 2, 2008 Share Posted September 2, 2008 I'm new to SQL Commands via php, but here's my script: <?php define(BUNGIE, 'http://www.bungie.net'); $db_link = mysql_connect("mysql301.ixwebhosting.com", "uberpil_admin", "imtheplaya"); if (!$db_link) { die("Could not connect: " . mysql_error()); } mysql_select_db("uberpil_evo") or die("Could not select database"); $uname = $_COOKIE['user']; $read1 = 'SELECT tag FROM nuke_halo_3 WHERE uname=\'' . $uname . '\''; $url_player1 = mysql_query($read1); mysql_close($db_link); ?> My result of $url_player1 is always Resource id #52 even if I set the $uname variable to a constant. What's going wrong or what do I need to change? Link to comment https://forums.phpfreaks.com/topic/122327-mysql-result-resource-id-52/ Share on other sites More sharing options...
trq Posted September 2, 2008 Share Posted September 2, 2008 Nothing is wrong, what are you expecting? mysql_query() returns a result resource. Link to comment https://forums.phpfreaks.com/topic/122327-mysql-result-resource-id-52/#findComment-631670 Share on other sites More sharing options...
Third_Degree Posted September 2, 2008 Share Posted September 2, 2008 I think you need to look into the mysql_result() or mysql_fetch_* functions. Link to comment https://forums.phpfreaks.com/topic/122327-mysql-result-resource-id-52/#findComment-631671 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.