Hello Every body I have an SQL Query to DB
function darkSiteContent($delta){ switch ($delta) { //SQL Query to find the title , nid of the node and its body case 'popup_dark_screen': $result = db_query(" SELECT n.title , n.nid , b.body_value FROM {dot_node} as n , {dot_field_revision_body} as b , {dot_node_type} as t WHERE t.type = 'dark_sit' AND n.type = t.type and b.bundle = t.type order by n.title desc LIMIT 1 "); $items = array(); foreach ($result as $row) { print_r($row); $items[] = l(t($row->title, 'node/' . $row->nid )).'
'.$row->body_value; } return array('#markup' => theme('item_list', array('items' => $items))); break; } }
But it show this error
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'APIG01JO2012039.dot_dot_node' doesn't exist: SELECT n.title , n.nid , b.body_value FROM {dot_node} as n , {dot_field_revision_body} as b , {dot_node_type} as t WHERE t.type = 'dark_sit' AND n.type = t.type and b.bundle = t.type order by n.title desc LIMIT 1 ; Array ( ) in darkSiteContent() (line 71 of C:\AppServ\www\APIG01JO2012039\sites\all\modules\darksite\darksite.module).
I am sure of my table name but it still show this error