Re: cgi ordering a table with sql

2008-05-30 Thread Pat Rice
Thanks Gunnar,Jenda And everyone else that responded, its was great to get it working. Its one of thoese ones were you spend time staring at the code saying that it should work, but it dosent. Thanks :) Pat -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Re: cgi ordering a table with sql

2008-05-30 Thread Jenda Krynicky
From: Gunnar Hjalmarsson <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > From: "Pat Rice" <[EMAIL PROTECTED]> > >> > >> my $sth = $dbh->prepare('SELECT * FROM test1 ORDER BY ?'); > > > > Most databases would not let you prepare a statement like this. Most > > often only values may be replaced b

Re: cgi ordering a table with sql

2008-05-29 Thread Gunnar Hjalmarsson
Jenda Krynicky wrote: From: "Pat Rice" <[EMAIL PROTECTED]> my $sth = $dbh->prepare('SELECT * FROM test1 ORDER BY ?'); Most databases would not let you prepare a statement like this. Most often only values may be replaced by placeholders, not column names. Hmm.. My fault, obviously. I had n

Re: cgi ordering a table with sql

2008-05-29 Thread Jenda Krynicky
From: "Pat Rice" <[EMAIL PROTECTED]> > Hi all > I'm trying to get the following working > what I want to do is to click on the link and it would order the > table, through the SQL query. > > I think the problem is that when I click on on the link to ORDER BY it > fails, that is it does not change

Re: cgi ordering a table with sql

2008-05-29 Thread Gunnar Hjalmarsson
Pat Rice wrote: Hi all I'm trying to get the following working what I want to do is to click on the link and it would order the table, through the SQL query. I think the problem is that when I click on on the link to ORDER BY it fails, that is it does not change the order of the table. It work

Re: cgi ordering a table with sql

2008-05-29 Thread Pat Rice
Hi all I'm trying to get the following working what I want to do is to click on the link and it would order the table, through the SQL query. I think the problem is that when I click on on the link to ORDER BY it fails, that is it does not change the order of the table. I wondering does anyone kno

Re: cgi ordering a table with sql

2008-05-19 Thread Gunnar Hjalmarsson
Pat Rice wrote: I'm trying to achieve the following a table that when I click on the top link I will chance the ORDER BY value in the table. eg |fruit | boxes | |orange | 10| |apples | 5 | so if fruit was a link and I clicked it I would change my select statement to order by fruit, if