--- In [email protected], Mike Franks <[EMAIL PROTECTED]> wrote:
>
> > --- In [email protected] <mailto:php-list%40yahoogroups.com>, 
> > James Keeline <keeline@
> >
> > > wrote:
> > >
> > >
> > > --- whoisquilty <whoisquilty@> wrote:
> > >
> > > > I've removed floor() and changed it to:
> > > >
> > > > $var = $_GET['var'];
> > > >
> > > > Now I get this...modified but still similar:
> > > >
> > > > You have an error in your SQL syntax. Check the manual that 
> > corresponds to
> > > > your MySQL
> > > > server version for the right syntax to use near 'WHERE begins = 
> > 'A'' at line
> > > > 4
> > > >
> > > > I've tried the three different variations on the WHERE statement 
> > that you
> > > > suggested and
> > > > always get an error similar to above.
> > > >
> > > > Any other suggestions?
> > >
> > > We like replies at the bottom of the messages.
> > >
> > > Does your table have suitable values for the "begins" column?
> > >
> > > If you print the $query variable, what does it show?
> >
> > There is no query variable because the page doesn't get that far when 
> > loading. It his the
> > WHERE statement and doesn't finish to calculate the $query variable.
> >
> > Jeremy
> >
> 
> Jeremy, it's not clear from your reply whether or not you've corrected 
> the SQL query as Pete suggested....
> 
> The ORDER BY clause must be after the WHERE clause:
> 
> select *
> from table
> where criteria
> order by ....
> 
> Mike


Ummmmmmmmmmmmm...ok....so embarrassed here that I almost didn't reply.

The ORDER BY was not in the correct order and I didn't see it. That was the 
problem all 
along.

My sincere apologies for wasting everyone's time.

Reply via email to