[kronolith] Error in SQL query (Or my table structure?)
mccallum@forge.com.au
mccallum@forge.com.au
Fri, 27 Sep 2002 16:55:20 +1000
Quoting Mike Cochrane <mike@graftonhall.co.nz>:
> > ----- Message from mccallum@forge.com.au ---------
> >
> > Hi!!
> >
> > I'm running the latest CVS version of everything, and I'm getting an error
> as
> > specified below. This is across the top of the Horde Summary Page above the
> > top
> > menu bar:
> >
> > The error also appears across the top of the Calendar page with the same
> > error.
> > (I'm guessing the "SELECT 0" SQL is incorrectly generated.
>
> We may not need it, but it's still correct SQL and does work. What you didn't
> tell us was what database you are using? I don't have a problem with the code
> on
> mysql.
Sorry - Doh!!!
Mysql on Red hat 7.3 - Ver 11.16 Distrib 3.23.49, for redhat-linux-gnu (i386)
I recreated all the table from CVS scripts last monday - a structure dump from
mysqladmin shows:
category_id int(11) NOT NULL default '0',
group_uid varchar(255) NOT NULL default '',
user_uid varchar(255) NOT NULL default '',
category_name varchar(255) NOT NULL default '',
category_parents varchar(255) NOT NULL default '',
category_data text,
category_serialized smallint(6) NOT NULL default '0',
category_updated timestamp(14) NOT NULL,
PRIMARY KEY (category_id),
KEY category_category_name_idx (category_name),
KEY category_group_idx (group_uid),
KEY category_user_idx (user_uid),
KEY category_serialized_idx (category_serialized)
> - Mike :-)
>
> > And I get this in the Log file :
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT 0, category_id,
> > category_parents FROM horde_categories WHERE category_name = 'kronolith'
> AND
> > group_uid = 'horde.shares' [on line 151 of "/home/www/mail/horde-
> > cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT category_id,
> category_name,
> > category_parents FROM horde_categories WHERE (category_parents LIKE ':1%'
> OR
> > category_id = 1) AND group_uid = 'horde.shares' [on line 181
> > of "/home/www/mail/horde-cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT 0, category_id,
> > category_parents FROM horde_categories WHERE category_name = 'kronolith'
> AND
> > group_uid = 'horde.groups' [on line 151 of "/home/www/mail/horde-
> > cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT category_id,
> category_name,
> > category_parents FROM horde_categories WHERE (category_parents LIKE ':3%'
> OR
> > category_id = 3) AND group_uid = 'horde.groups' [on line 181
> > of "/home/www/mail/horde-cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT 0, category_id,
> > category_parents FROM horde_categories WHERE category_name = 'kronolith'
> AND
> > group_uid = 'horde.perms' [on line 151 of "/home/www/mail/horde-
> > cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT category_id,
> category_name,
> > category_parents FROM horde_categories WHERE (category_parents LIKE ':5%'
> OR
> > category_id = 5) AND group_uid = 'horde.perms' [on line 181
> > of "/home/www/mail/horde-cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT 0, category_id,
> > category_parents FROM horde_categories WHERE category_name = 'kronolith'
> AND
> > group_uid = 'horde.shares' [on line 151 of "/home/www/mail/horde-
> > cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT category_id,
> category_name,
> > category_parents FROM horde_categories WHERE (category_parents LIKE ':1%'
> OR
> > category_id = 1) AND group_uid = 'horde.shares' [on line 181
> > of "/home/www/mail/horde-cvs/horde/horde/lib/Category/sql.php"]
> >
> > Sep 27 13:47:42 HORDE [debug] [kronolith] SELECT category_data FROM
> > horde_categories WHERE category_id = 9 AND group_uid = 'horde.shares' [on
> > line
> > 404 of "/home/www/mail/horde-cvs/horde/horde/lib/Category/sql.php"]
> >
> >
> >
> >
> > Platform Info
> > =================
> > Red Hat 7.3
> > Apache/1.3.23 (Unix) (Red-Hat/Linux) mod_ssl/2.8.7 OpenSSL/0.9.6b
> DAV/1.0.3
> > PHP/4.2.2 mod_perl/1.26 mod_jk/1.1.0
> >
> > ----- End message from mccallum@forge.com.au -----
>
> --
> Kronolith mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org