Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Concacinated SQL queries...

Quote Reply
Concacinated SQL queries...
Hi. I've hit a bit of a stumbeling block, with the GT::SQL documents don't seem to cover. Basically, I have this code;

Code:
# create a table connection...
my $table = $DB->table('Links','CatLinks');
$table->select_options ("LIMIT $limit");
$table->select_options ('ORDER BY RAND()');
my $sth = $table->select( { }, { CategoryID => 12 } );

If I comment out the 3rd line, it brings up the results fine... but as soon asI try to use a 'LIMIT', itdoesn't give me any results.

Has anyone ever come across this, and if so, would you mind sharing the fix for it?

TIA.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Concacinated SQL queries... In reply to
Discussed before:

http://www.gossamer-threads.com/...rum.cgi?post=238046;

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Concacinated SQL queries... In reply to
Duh. Now that was stupid of me not to remember that. I even replied to the thread! This heat is really getting to me Frown

Thanks yogi.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!