Select * from $log where date = $date AND [ ( name1= $n1 AND name2 = $n2) OR (name1 = $n2 AND name2 = $n2)]how can i write it as php select command?
using SELECT command.
Posted 26 July 2006 - 07:45 PM
Posted 26 July 2006 - 07:49 PM
logical, here is what i need to write:
Select * from $log where date = $date AND [ ( $n1=name1 and $n2 =name2) OR ($n2=name1 and $n2 = name2) ]how can i write it as php select command?
where $date is in YYYY-MM-DD format:
<?php $sql = "SELECT * FROM $log WHERE date = '$date' AND ((name1 = '$n1' AND name2 = '$n2) OR (name1 = '$n2' AND name2 = '$n1'))"; ?>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users