etogal mysql error
Started by robotarchie, May 27 2007 01:27 PM
6 replies to this topic
#1
Posted 27 May 2007 - 01:27 PM
I've just installed the etogal snippet "etogal1 beta3" and called it from a page using [[etogal]] and I get the following error message when i try to load the page.
Etomite encountered the following error while attempting to parse the requested resource: « Execution of a query to the database failed » SQL: SELECT * FROM `etomite`.etomite_etogal WHERE gal_id in (55) ORDER BY gal_id,id ;
I have a feeling (but its uncertain) that I have to manually create the table etomite_etogal and if so how many fields do I include and of what type?
Any advice will be appreciated!
Etomite encountered the following error while attempting to parse the requested resource: « Execution of a query to the database failed » SQL: SELECT * FROM `etomite`.etomite_etogal WHERE gal_id in (55) ORDER BY gal_id,id ;
I have a feeling (but its uncertain) that I have to manually create the table etomite_etogal and if so how many fields do I include and of what type?
Any advice will be appreciated!
#2
Posted 27 May 2007 - 03:49 PM
robotarchie, on May 27 2007, 02:27 PM, said:
I've just installed the etogal snippet "etogal1 beta3" and called it from a page using [[etogal]] and I get the following error message when i try to load the page.
Etomite encountered the following error while attempting to parse the requested resource: « Execution of a query to the database failed » SQL: SELECT * FROM `etomite`.etomite_etogal WHERE gal_id in (55) ORDER BY gal_id,id ;
I have a feeling (but its uncertain) that I have to manually create the table etomite_etogal and if so how many fields do I include and of what type?
Any advice will be appreciated!
Etomite encountered the following error while attempting to parse the requested resource: « Execution of a query to the database failed » SQL: SELECT * FROM `etomite`.etomite_etogal WHERE gal_id in (55) ORDER BY gal_id,id ;
I have a feeling (but its uncertain) that I have to manually create the table etomite_etogal and if so how many fields do I include and of what type?
Any advice will be appreciated!
If all you had done was to copy the etogal snippet (not etogalthumb or etogalgal) and called it using [[etogal]] it would not have executed that query. In fact I can't offhand think of any circumstances under which the EtoGal snippet would execute that query (the order by clause is wrong!).
Note you MUST install the etogal snippet, and put it on a page, and show that page before using any of the other snippets in this section. When first used, the etogal snippet will (or at least should) create the database table for you. It is also the only snippet that allows loading of images.
PS
You probably would get that select query issued if you had installed the etoGalGallery snippet as EtoGal, and that would then result in an error, as there would be no Etogal table in the database.
Edited by mikef, 27 May 2007 - 05:02 PM.
#3
Posted 27 May 2007 - 05:03 PM
If you have installed phpMyAdmin(or some other tools) you should be able to confirm that the table has been created.
You may have to set path to galleries:
$path_to_galleries= "assets/galleries/";
Table definitions should bee something like this if you have to manually create table:
CREATE TABLE "etogal" (
`id` int(10) unsigned NOT NULL auto_increment,
`gal_id` int(10) unsigned NOT NULL,
`filename` varchar(50) NOT NULL,
`title` text NOT NULL,
`date` datetime NOT NULL,
`descr` text default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1
(Anyway, Etogal snippet should automatically create this table for you)
I'm not the expert on this forum but I'm Etomite Forum addicted :-)
You may have to set path to galleries:
$path_to_galleries= "assets/galleries/";
Table definitions should bee something like this if you have to manually create table:
CREATE TABLE "etogal" (
`id` int(10) unsigned NOT NULL auto_increment,
`gal_id` int(10) unsigned NOT NULL,
`filename` varchar(50) NOT NULL,
`title` text NOT NULL,
`date` datetime NOT NULL,
`descr` text default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1
(Anyway, Etogal snippet should automatically create this table for you)
I'm not the expert on this forum but I'm Etomite Forum addicted :-)
Edited by Oppdragnemo, 27 May 2007 - 05:04 PM.
#4
Posted 10 June 2007 - 01:30 PM
On the subject of where clauses, can anyone see a reason why a where clause asking for a number would work, but asking for text will not?
?where_clause=STATUS = 'NFS' (this query was performed in phpMyAdmin and copied and pasted into a snippet call, so I KNOW the database accepts it and returns results), however...
Notice the 'NFS' is missing. if I add another parameter to the end of the call, like this...
?where_clause=STATUS = 'NFS'&maxOnPage=6
the error changes to...
The 'NFS' is back in the query, but still not passable as a parameter (even though it exists in the column).
?where_clause=gal_id=80 OR e_gals=60
works fine.
?where_clause=STATUS = 'NFS' (this query was performed in phpMyAdmin and copied and pasted into a snippet call, so I KNOW the database accepts it and returns results), however...
Quote
Etomite encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed »
SQL: SELECT * FROM `database_etomite`.etomite_etogal WHERE STATUS = ORDER BY id ASC LIMIT 20;
« Execution of a query to the database failed »
SQL: SELECT * FROM `database_etomite`.etomite_etogal WHERE STATUS = ORDER BY id ASC LIMIT 20;
?where_clause=STATUS = 'NFS'&maxOnPage=6
the error changes to...
Quote
Etomite encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed »
SQL: SELECT * FROM `database_etomite`.etomite_etogal WHERE STATUS = 'NFS' ORDER BY id ASC LIMIT 99999;
« Execution of a query to the database failed »
SQL: SELECT * FROM `database_etomite`.etomite_etogal WHERE STATUS = 'NFS' ORDER BY id ASC LIMIT 99999;
The 'NFS' is back in the query, but still not passable as a parameter (even though it exists in the column).
?where_clause=gal_id=80 OR e_gals=60
works fine.
#5
Posted 10 June 2007 - 02:14 PM
have you got a column called STATUS in the etogal table?
is STATUS a MySQL reserved word?
is STATUS a MySQL reserved word?
#6
Posted 10 June 2007 - 03:12 PM
Cris D., on Jun 10 2007, 09:30 AM, said:
On the subject of where clauses, can anyone see a reason why a where clause asking for a number would work, but asking for text will not?
?where_clause=STATUS = 'NFS' (this query was performed in phpMyAdmin and copied and pasted into a snippet call, so I KNOW the database accepts it and returns results), however...
<<< SNIP >>>
?where_clause=STATUS = 'NFS' (this query was performed in phpMyAdmin and copied and pasted into a snippet call, so I KNOW the database accepts it and returns results), however...
<<< SNIP >>>
#7
Posted 11 June 2007 - 01:18 AM
@Mike: Yeah, my etogal table has grown to 24 cols now (almost a picture shopping cart) lol
I changed the colname from status to ostatus...
@Ralph: I started as you suggested above, and tried different options from there. The error above was from the call...
No quotes, plain text.
I changed the colname from status to ostatus...
Quote
Etomite encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed »
SQL: SELECT * FROM `database_etomite`.etomite_etogal WHERE ostatus=NFS ORDER BY id ASC LIMIT 99999;
« Execution of a query to the database failed »
SQL: SELECT * FROM `database_etomite`.etomite_etogal WHERE ostatus=NFS ORDER BY id ASC LIMIT 99999;
@Ralph: I started as you suggested above, and tried different options from there. The error above was from the call...
Quote
etogal_multigals3?where_clause=ostatus=NFS
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











