[PHP-DB] Select * from t1.id where not equal to t2.id ???

2002-08-03 Thread Dave Carrera
High all I cant seem to get this sql working. I am trying to pull everything from table 1 (t1) where t1.id is not equal to table 2 (t2) id I cant find examples anywhere. Any help or guidance with this as always is very much appreciated. Thanks in Advance Dave C

Re: [PHP-DB] Select * from t1.id where not equal to t2.id ???

2002-08-03 Thread Miles Thompson
Why not: select * from table1 where table1.id != table2.id or it may be necessary to incorporate a fragment of table2 select table1.8, table2.id from table1, table2 where table1.id != table2.id Note this tests against only one the current table2.id, not all of them. So

RE: [PHP-DB] problem getting form input field to become part of query statement

2002-08-03 Thread Rich Hutchins
Try referencing the $listbox variable in you SQL statement like this: $sql = insert into .$listbox. values(NULL,'$date','$exercise','$reps','$comments'); I'm guessing that it might also work like this: $sql = insert into '$listbox' values(NULL,'$date','$exercise','$reps','$comments'); I think

RE: [PHP-DB] Re: Addslashes in SQL Statement - SOLVED

2002-08-03 Thread Rich Hutchins
Just a quick post to say that I resolved this issue. Thanks, JJ, for taking the time to reply. Turns out it WAS just something stupid like I thought. A bad HREF pointing to an old version of the page without the addslashes() stuff implemented. Rich -Original Message- From: JJ Harrison

[PHP-DB] Re: Select * from t1.id where not equal to t2.id ???

2002-08-03 Thread Dan Koken
Dave, Try something like this: SELECT * FROM t1 LEFT JOIN t2 ON t2.id = t1.id WHERE t2.id is NULL HTH. Dan. Dave Carrera wrote: High all I cant seem to get this sql working. I am trying to pull everything from table 1 (t1) where t1.id is not equal to table 2 (t2) id I cant

Re: [PHP-DB] select from two tables

2002-08-03 Thread Caleb Walker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I did not look at the code very much but if you want to select from 2 tables your sql statement is like this: select a.col1,b.col1 from table1 a,table2 b where a.column=b.column column='value'; I think that if this is what you are looking for

[PHP-DB] SELECTing a date range from a table

2002-08-03 Thread Chase Knott
I am a newbie. There, I said it! *gryn* Maybe someone here can help me out... I am trying to figure out how to select a range of dates from my table to be used in a dynamic page. I know it is something simple, but I just can't seem to find anything. Any help would be great. Thanks!!