geroido Posted August 21, 2008 Share Posted August 21, 2008 Hi Not sure if this is the right place to post this. I simply want to display my sql query so that I can see what it contains. Not the database results but the query itself. Any ideas? Link to comment https://forums.phpfreaks.com/topic/120691-solved-displaying-my-sql-query-contents-problem/ Share on other sites More sharing options...
paul2463 Posted August 21, 2008 Share Posted August 21, 2008 instead of using $query = "SELECT * FROM table where whatever"; mysql_query($query) or die ("Error in query" .mysql_error()); use $query = "SELECT * FROM table where whatever"; echo($query); Link to comment https://forums.phpfreaks.com/topic/120691-solved-displaying-my-sql-query-contents-problem/#findComment-621943 Share on other sites More sharing options...
geroido Posted August 21, 2008 Author Share Posted August 21, 2008 Hi paul2463 That's it. Thanks. I can see now that my query is empty. Link to comment https://forums.phpfreaks.com/topic/120691-solved-displaying-my-sql-query-contents-problem/#findComment-621966 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.