Afficher un message
Vieux 15/03/2008, 01h44   #3
Jim Lucas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Is this the best way?

Jason Pruim wrote:
>
> On Mar 14, 2008, at 5:03 PM, TG wrote:
>
>>
>>
>>
>> ----- Original Message -----
>> From: Jason Pruim <japruim@raoset.com>
>> To: TG <tg-php@gryffyndevelopment.com>
>> Cc: "PHP General List" <php-general@lists.php.net>
>> Date: Fri, 14 Mar 2008 14:56:32 -0400
>> Subject: Re: [php] Is this the best way?
>>
>>>
>>> On Mar 14, 2008, at 1:44 PM, TG wrote:
>>>
>>>>
>>>> What error are you getting? Maybe there's some way to fix that too.
>>>
>>> The error I get without checking the row count is this:
>>>
>>> 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 'order by LName' at line 1

>>
>> Ok so the next thing to check is your query. Maybe echo it out so you
>> can
>> see what's actually attempting to execute.

>
> echo from my actual query
> SELECT * FROM current WHERE loginName='japruim' AND
> loginPassword='mybadpassword' LIMIT 0,1;


obviously it isn't this SQL statement that is causing the problem, it doesn't
have the ORDER BY piece that is failing.

>>
>>
>> I don't see an "ORDER BY" in the SQL listed below.

>
> The ORDER BY actually comes from a different query that should ONLY be
> done AFTER successful login... It's actually related to the sorting of
> the records that should be retrieved.


Somehow it is getting to this statement and the variable that you are using just
before the ORDER BY part is empty, Why don't you show us that statement.



--
Jim Lucas

"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare
  Réponse avec citation
 
Page generated in 0,05282 seconds with 9 queries