Re: [PHP] Re: Variable for search results

2004-11-08 Thread Ben Ramsey
Stuart Felenstein wrote: --- Ben Ramsey <[EMAIL PROTECTED]> wrote: I'm not exactly sure what the SQL statement you have above is supposed to do, but you could just do something like this: $curdate = date('Y-m-d H:i:s'); $sql = "SELECT * FROM records WHERE '$curdate' <= PostStart;"; I'm having som

Re: [PHP] Re: Variable for search results

2004-11-08 Thread Stuart Felenstein
--- Ben Ramsey <[EMAIL PROTECTED]> wrote: > I'm not exactly sure what the SQL statement you have > above is supposed > to do, but you could just do something like this: > > $curdate = date('Y-m-d H:i:s'); > $sql = "SELECT * FROM records WHERE '$curdate' <= > PostStart;"; > I'm having some pro

[PHP] Re: Variable for search results

2004-11-08 Thread Ben Ramsey
Stuart Felenstein wrote: $sql.=sprintf("SELECT * FROM records WHERE Date_Sub(Curdate(), interval day) "$%s" <= PostStart") Yes, you can put the variable in right there. Read up on variables here . I'm not exactly sure what the SQL statement you have above is suppos