[PHP-DB] adding a simple WHERE clause to this MySQL query causes the result to contain 0 rows?!

2009-08-09 Thread John Butler
Can anyone see what must be a simple error in the way I am trying to construct the 2 WHERE clauses, below? (in the latter query) These two columns in the two separate tables are of type TIMESTAMP: solarLandingDateTime solarAWDateTime The values I am passing into the query are like so var_dump(

Re: [PHP-DB] adding a simple WHERE clause to this MySQL query causes the result to contain 0 rows?!

2009-08-09 Thread Chris
John Butler wrote: Can anyone see what must be a simple error in the way I am trying to construct the 2 WHERE clauses, below? (in the latter query) These two columns in the two separate tables are of type TIMESTAMP: solarLandingDateTime solarAWDateTime The values I am passing into the query ar

Re: [PHP-DB] adding a simple WHERE clause to this MySQL query causes the result to contain 0 rows?!

2009-08-09 Thread gunawan
read 2nd something not right.. or should show ERRORRR?? but. let's skip it.. i think you tried it and work.. soo ignore this line. uniqueDate?? why not order by id.. is the same right? >>It seems super easy to me; great.. i need 1 hour to understand this can you include sample from those table

Re: [PHP-DB] adding a simple WHERE clause to this MySQL query causes the result to contain 0 rows?!

2009-08-09 Thread John Butler
echo mysql_error(); You will need to quote your timestamps: where date(solarLandingDateTime) >= '" . mysql_real_escape_string($userPikStartDate) . "' AND date(solarLandingDateTime) <= '" . mysql_real_escape_string($userPikEndDate) . "' If all else fails, echo $query; Than

Re: [PHP-DB] adding a simple WHERE clause to this MySQL query causes the result to contain 0 rows?!

2009-08-09 Thread Chris
John Butler wrote: echo mysql_error(); You will need to quote your timestamps: where date(solarLandingDateTime) >= '" . mysql_real_escape_string($userPikStartDate) . "' AND date(solarLandingDateTime) <= '" . mysql_real_escape_string($userPikEndDate) . "' If all else fails, ech