RE: Can someone help me out?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The default for limit starts at one, so you don't need the two variables.
My issue is with the variables not putting their value in.

Thanks
-Rich

-----Original Message-----
From: Isidor Stankov [mailto:istankov@xxxxx]
Sent: Tuesday, June 07, 2005 7:56 PM
To: ReClMaples
Subject: Re:  Can someone help me out?

error is in $limit !!!

you need to limit by two variables, starting and how many entities you want
to get, for exampe

LIMIT '$beggining', '$howmany'


Best regards

Isidor stankov
----- Original Message -----
From: "ReClMaples" <reclmaples@xxxxxxxxxxxxx>
To: "PHP" <php-db@xxxxxxxxxxxxx>
Sent: Wednesday, June 08, 2005 1:04 AM
Subject:  Can someone help me out?


>I am having a problem getting a sql statement to run.
>
> I have this in a table called stat_categories, in a field called sql2
>
> select a.name,a.position,a.team,sum(b.yards) as Results from player
> a,passing b
> where
> a.player_num = b.player_num
> and a.position = '$pos'
> and b.year >= '$year'
> group by a.name
> order by Results desc
> limit '$display'
>
> when I try to display this I get this error:
>
> 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 ''$display'' at
> line 8
>
> I tried removing the ''s but this didn't help.
>
> If I put in the sql instead of the variable, it works fine.  What am I
> doing
> wrong?
>
> Any help would be greatly appreciated.
>
> Thanks
> -Rich
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux