This is what i get when i execute a script:
Fatal error: Call to a member function sql_query() on a non-object in C:\Program Files\xampp\htdocs\ver6\a1\menu.php on line 6
and this is the part of code that causes the error
5. $sql ="SELECT * from $table WHERE nav_pub = '1' ORDER BY nav_id";
6 $result = $db->sql_query($sql); <-------- This is line "6"
7. while ($row = $db->sql_fetch_assoc($result)){
$nav_id1 = $row['nav_id'];
$nav_title = $row['nav_title'];
$nav_a_id = $row['nav_a_id'];
$nav_go = $row['nav_go'];