Connecting Tech Pros Worldwide Help | Site Map

'Select' & 'Order By' OK- Where Does Not Work

ian justice
Guest
 
Posts: n/a
#1: Jul 20 '05
Before i post actual code, as i need a speedyish reply.
Can i first ask if anyone knows off the top of their head, if there is
a likely obvious cause to the following problem.
For the moment i've reduced my form request to a simple text string
entry, instead of my desired optional parameters. As i have been stuck
with a single unfathomable glitch for over a year.
Basically, if i enter queries such as ;
"select * from table" "select * from table order by artist",
it works perfectly. However if i introduce the 'where' option, as in
"select * from table where artist like whatever". It comes back with
"could not execute query". This happens even if i append "order by" to
it.
I'll post all the various codes if anyone can please help.
Too Sexy
Guest
 
Posts: n/a
#2: Jul 20 '05

re: 'Select' & 'Order By' OK- Where Does Not Work


It might be a stupid question,
but sometimes the most stupid thing is the problem!!!

Did you by any chance forget quotes?
The way you typed it you're comparing to columns!!!

"ian justice" <i.justice@onmail.co.uk> schreef in bericht
news:f6c8e066.0310311222.44f13b70@posting.google.c om...[color=blue]
> Before i post actual code, as i need a speedyish reply.
> Can i first ask if anyone knows off the top of their head, if there is
> a likely obvious cause to the following problem.
> For the moment i've reduced my form request to a simple text string
> entry, instead of my desired optional parameters. As i have been stuck
> with a single unfathomable glitch for over a year.
> Basically, if i enter queries such as ;
> "select * from table" "select * from table order by artist",
> it works perfectly. However if i introduce the 'where' option, as in
> "select * from table where artist like whatever". It comes back with
> "could not execute query". This happens even if i append "order by" to
> it.
> I'll post all the various codes if anyone can please help.[/color]


ian justice
Guest
 
Posts: n/a
#3: Jul 20 '05

re: 'Select' & 'Order By' OK- Where Does Not Work


"Too Sexy" <someone@nobody.com> wrote in message news:<bnugpn$bg5$1@news3.tilbu1.nb.home.nl>...[color=blue]
> It might be a stupid question,
> but sometimes the most stupid thing is the problem!!!
>
> Did you by any chance forget quotes?
> The way you typed it you're comparing to columns!!!
>[/color]
I've tried every combination of single and double quotes.
Interestingly enough it actually sorts and fulfills requests
as detailed below ( 1 & 2 ), WITHOUT ANY QUOTES AT ALL !.
I enter it into my text field without any punctuation.
1. select * from table
2 .select * from table order by column

I'm sending this via web tv, so i'll post the scripts on a pc come Sunday.

The versions i am using are;
PHP4u Version 3.0 Based on PHP-4.3.2
MySQL 3.23.52
Closed Thread