Differences

This shows you the differences between two versions of the page.

dev:sahana_adodb [2009/07/06 20:36]
127.0.0.1 external edit
dev:sahana_adodb [2009/08/19 13:55] (current)
hayesha
Line 184: Line 184:
// the following is not recommended // the following is not recommended
-$query = "SELECT * FROM table1 JOIN table2 on field1=field2 JOIN table3 ON field3=field4 WHERE field5=?";+$query = "SELECT * FROM table1 JOIN table2 ON field1=field2 JOIN table3 ON field3=field4 WHERE field5=?";
$res = $db->Execute($query,array('param1'); $res = $db->Execute($query,array('param1');
// instead it should be written as follows. // instead it should be written as follows.
-$query = "SELECT * FROM table1 t1 JOIN table2 t2 on t1.field1=t2.field2 JOIN table3 t3 ON t3.field3=t2.field4 WHERE t3.field5=?";+$query = "SELECT * FROM table1 t1 JOIN table2 t2 ON t1.field1=t2.field2 JOIN table3 t3 ON t3.field3=t2.field4 WHERE t3.field5=?";
$res = $db->Execute($query,array('param1'); $res = $db->Execute($query,array('param1');
</code> </code>

Navigation
  • Navigate