Clan Adverts

A very simple way to debug a nuke mysql query

Description: This is a very simple tactic to debug a phpnuke mysql query if you have error reporting on.
Version: 1.0
Added on: 27 January 2009
Author: Floppy
Difficulty Level: Very Easy
Views: 727
Rating: 9.0 (1 Vote)
Detailed Profile

Code:
   global $db, $prefix;
   $sql = "SELECT * FROM ".$prefix."_mytable";
   $query = $db->sql_query($sql);
   if(mysql_error()){
      echo mysql_error();
      die();
   }


It is useful if you understand the above code. Very easy and simple like I said.