Aug 9, 2001 #1 jgeddes Programmer Aug 3, 2001 18 US Is it possible to SHOW the SQL statement on the web page for troubleshooting? I use a package on the IBM AS/400 that allows me to see the select statement so I can debug. Can PHP do something like that? Thanks John
Is it possible to SHOW the SQL statement on the web page for troubleshooting? I use a package on the IBM AS/400 that allows me to see the select statement so I can debug. Can PHP do something like that? Thanks John
Aug 9, 2001 #2 inlandpac Programmer Jun 18, 2000 235 US You can assign your SQL to a variable. $q = "SELECT COUNT(DISTINCT(zip_code)) FROM my_table"; echo $q; if($debug) { echo $q; } $r = @mysql_query($q) or die(mysql_error()); Chad ICQ: 54380631 Upvote 0 Downvote
You can assign your SQL to a variable. $q = "SELECT COUNT(DISTINCT(zip_code)) FROM my_table"; echo $q; if($debug) { echo $q; } $r = @mysql_query($q) or die(mysql_error()); Chad ICQ: 54380631
Aug 10, 2001 Thread starter #3 jgeddes Programmer Aug 3, 2001 18 US Thanks Chad! That worked great. John Upvote 0 Downvote