On Sat, 01 Mar 2008 18:50:56 +0100, Gilles Ganault <[EMAIL PROTECTED]> wrote: >This doesn't work as intended, because it returns all the rows, >effectively ignoring the WHERE part:
Thanks everyone for the help. Problem solved: $dbh = new PDO("sqlite:test.sqlite"); $sql = "SELECT Table1.*,Table2.name FROM Table1,Table2 WHERE Table1.table2id=1 AND Table2.id=1"; $rows = $dbh->query($sql); echo "<table border=1>"; while($row = $rows->fetch(PDO::FETCH_NUM) ) { echo "<tr>\n"; for($i=0;$i<count($row);$i++) { echo "<td>$row[$i]</td>\n"; } echo "</tr>\n"; } echo "</table>"; $dbh = null; _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users