Re: [phpOpenTracker-User] patch to turn 0/1 into true/false for postgres compatibility

Jean-Christian Imbeault <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.general
Message-ID <[email protected]>
I've quoted the 0/1's and this seems to work in postgres, how about MySQL?

I did change/test any of the plugins though ...

I made/tested the following changes (I think these are all of them :):

API/plugins/top.php

line: 122
-$dataConstraint = 'AND accesslog.entry_document = 1';
+$dataConstraint = 'AND accesslog.entry_document = \'1\'';

API/Plugin.php

line: 90
-" AND accesslog%s.document_id = %d AND accesslog%s.entry_document = 1",
+" AND accesslog%s.document_id = %d AND accesslog%s.entry_document = '1'",

LoggingEngine.php

line 223:
-VALUES (%d, %d, %d, %d)",
+VALUES (%d, %d, %d, %s)",

line: 229
-$this->container['first_request'] ? 1 : 0
+$this->container['first_request'] ? "'1'" : "'0'"

line 252:
+%d, %d, %d)",
-%d, %d, %s)",

line: 264
-$this->container['returning_visitor'] ? 1 : 0
+$this->container['returning_visitor'] ? "'0'" : "'0'"

Jean-Christian Imbeault



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.