OldWest Posted October 26, 2010 Share Posted October 26, 2010 This serves more or less a meaningless purpose for my testing, but I've been trying to echo out the names of the tables that are being used in my UPDATE and SELECT queries and I have yet found a way to do this.. Did some research on php.net and Google and did not find anything that seems to directly address this.. My guess is it's so stupid simple, I probably will have an answer by the time I wake up.. But id there are any suggestions on this, Id be glad to take. Quote Link to comment https://forums.phpfreaks.com/topic/216854-echo-the-table-names-i-am-using-in-my-query/ Share on other sites More sharing options...
trq Posted October 26, 2010 Share Posted October 26, 2010 Why not simply echo your queries? Quote Link to comment https://forums.phpfreaks.com/topic/216854-echo-the-table-names-i-am-using-in-my-query/#findComment-1126540 Share on other sites More sharing options...
OldWest Posted October 26, 2010 Author Share Posted October 26, 2010 Why not simply echo your queries? I don't think I understand exactly what you mean (and I'm about to fall asleep while I type ). I just tried a literally echo of my query result like: $result = mysql_query("SELECT * FROM orig_codes_1a") or die(mysql_error()); // END :: Create query to be displayed as final results of original codes table. echo "<p>$result</p>"; And as output I get: Resource id #4 Quote Link to comment https://forums.phpfreaks.com/topic/216854-echo-the-table-names-i-am-using-in-my-query/#findComment-1126548 Share on other sites More sharing options...
trq Posted October 26, 2010 Share Posted October 26, 2010 $sql = "SELECT * FROM orig_codes_1a"; $result = mysql_query($sql) or die(mysql_error()); // END :: Create query to be displayed as final results of original codes table. echo "<p>$sql</p>"; Quote Link to comment https://forums.phpfreaks.com/topic/216854-echo-the-table-names-i-am-using-in-my-query/#findComment-1126549 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.