Testing awfull... Serendipity and PostgreSQL 8.3

Posted by Santiago Zarate on Sunday, February 24. 2008 at 19:16 in PHP, Programacion, Tecnico

Today i noticed that my blog wasnt working as i expected... after some time... someone at #postgresql toldme to watch the typecasting... even i like serendipity... i have to admit it... someone sucks at sql planning... here is the patch for it:


--- functions_entries.orig.inc.php      2008-02-26 02:14:37.000000000 -0430
+++ functions_entries.inc.php 2008-02-26 02:16:32.000000000 -0430
@@ -518,7 +518,7 @@
ON e.authorid = a.authorid
{$cond['joins']}
WHERE
- e.$key LIKE '" . serendipity_db_escape_string($val) . "'
+ e.$key = '" . serendipity_db_escape_string($val) . "'
{$cond['and']}
LIMIT 1";




you can download it here