[pLog-svn] r3070 - plog/trunk/class/dao

Jon Daley plogworld at jon.limedaley.com
Tue Mar 14 13:42:35 GMT 2006


 	The timestamp has spaces in it, right?  So, you would have to put 
quotes around it.  Db::qstr just removes extra slashes, and escapes single 
quotes.

On Tue, 14 Mar 2006, mark at devel.lifetype.net wrote:

> Author: mark
> Date: 2006-03-14 04:52:59 +0000 (Tue, 14 Mar 2006)
> New Revision: 3070
>
> Modified:
>   plog/trunk/class/dao/articles.class.php
> Log:
> It seems the Db::qstr does not work for timestamp. So, I use '' to quote the timestamp to avoid the error.
>
> Modified: plog/trunk/class/dao/articles.class.php
> ===================================================================
> --- plog/trunk/class/dao/articles.class.php	2006-03-14 04:33:51 UTC (rev 3069)
> +++ plog/trunk/class/dao/articles.class.php	2006-03-14 04:52:59 UTC (rev 3070)
> @@ -193,7 +193,7 @@
>
> 			$query = "SELECT * FROM ".$this->getPrefix()."articles
> 			          WHERE blog_id = ".$article->getBlogId()." AND
> -					        date > ".$articleCorrectedDate." AND
> +					        date > '".$articleCorrectedDate."' AND
> 							status = ".POST_STATUS_PUBLISHED."
> 					  ORDER BY DATE ASC
> 					  LIMIT 0,1";
> @@ -220,7 +220,7 @@
>
> 			$query = "SELECT * FROM ".$this->getPrefix()."articles
> 			          WHERE blog_id = ".$article->getBlogId()." AND
> -					        date < ".$articleCorrectedDate." AND
> +					        date < '".$articleCorrectedDate."' AND
> 							status = ".POST_STATUS_PUBLISHED."
> 					  ORDER BY DATE DESC
> 					  LIMIT 0,1";
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

It's a question of whether we're going to go forward
into the future, or past into the back.
-- Dan Quayle


More information about the pLog-svn mailing list