genzedu777 Posted February 13, 2011 Share Posted February 13, 2011 Hi, I am not too sure if I have used the right command, I am using print_r($sql), to view my executed results, but apparently I received mysqli_result Object ( ) , any advice? Thanks $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die(mysqli_error($dbc)); //Run query $tutor_id = mysqli_real_escape_string($dbc, $_GET['tutor_id']); $query = "SELECT tpd.district_id, tpd.district_name, tpz.zone_id, tpz.zone_name FROM tutor_preferred_district AS tpd INNER JOIN tutor_preferred_dlocation AS tpdl USING (district_id) INNER JOIN tutor_preferred_zlocation AS tpzl USING (tutor_id) INNER JOIN tutor_preferred_zone AS tpz USING (zone_id) WHERE tpdl.tutor_id = '{$tutor_id}'"; $sql = mysqli_query($dbc, $query) or die(mysqli_error($dbc)); print_r($sql); Quote Link to comment https://forums.phpfreaks.com/topic/227509-how-do-i-test-and-view-the-results-after-executing-a-sql-command/ Share on other sites More sharing options...
trq Posted February 13, 2011 Share Posted February 13, 2011 Assuming that you want a mysql solution (this is after all the mysql help forum), why not simply execute your query within mysql's cli? Quote Link to comment https://forums.phpfreaks.com/topic/227509-how-do-i-test-and-view-the-results-after-executing-a-sql-command/#findComment-1173506 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.