koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] Koha2.2.4 0000-00-00 date is not valid in Postgresql


From: Simon Mitchell
Subject: [Koha-devel] Koha2.2.4 0000-00-00 date is not valid in Postgresql
Date: Tue, 6 Dec 2005 20:49:38 +1100

I am just playing around at home with Koha.
Have catalogued around 800 books 95% of which belong to my flat mate.

I have taken a mysql dump and loaded into a postgresql database and started debugging.

I have one question, this 0000-00-00 date is not valid in Postgresql, is this being phase out to just a null value?

and no more question by some info on my progress with koha on postgresql.

Half way through I decided to update the Postgresql entry on

http://www.saas.nsw.edu.au/koha_wiki/index.php?page=PostgreSQL

I need to add a bit more to the wiki and do some more work.

Anyway the things that i have changed in the perl code seem to work fine when I switch back to the  mysql database.

Hopefully some of this old sql will disappear with Koha  3.0 due to ZOOM.



The following examples are of patch files which  where required due to

Examples

cgi-bin/loadmodules.pl

--- koha-2.2.4/intranet-cgi/loadmodules.pl 
+++ postgresql/intranet/cgi-bin/loadmodules.pl
@@ -53,7 +53,7 @@
}

sub addbiblio {
- my $marc_bool = C4::Context->boolean_preference("MARC") || 0;



+ my $marc_bool = C4::Context->boolean_preference("marc") || 0;
if ($marc_bool eq "1") {
print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");

} else {


modules/C4/Search.pm

--- koha-2.2.4/modules/C4/Search.pm 
+++ postgresql/modules/C4/Search.pm
@@ -1354,7 +1354,7 @@
$data->{'datelastseen'}=$date;
$data->{'datedue'}=$datedue;
# get notforloan complete status if applicable



- my $sthnflstatus = $dbh->prepare('select authorised_value from marc_subfield_structure where kohafield="items.notforloan"');
+ my $sthnflstatus = $dbh->prepare('select authorised_value from marc_subfield_structure where kohafield=\'


items.notforloan\'');
$sthnflstatus->execute;
my ($authorised_valuecode) = $sthnflstatus->fetchrow;
if ($authorised_valuecode) {
@@ -1490,9 +1490,10 @@
my ($bibnum, $type) = @_;



my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("Select *, biblioitems.notes AS bnotes, biblio.notes
- from biblio, biblioitems
+ from biblio
left join bibliosubtitle on



biblio.biblionumber = bibliosubtitle.biblionumber
+ , biblioitems
left join itemtypes on biblioitems.itemtype=itemtypes.itemtype
where biblio.biblionumber = ?

and
biblioitems.biblionumber = biblio.biblionumber");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]