|
Posted by Justin on 04/11/06 05:18
Ridge Burner wrote:
> I'm using MySQL 5.0.18-Debian_8, sorry guess I should have said. :O
>
>
> "Tim Van Wassenhove" <timvw@users.sourceforge.net> wrote in message
> news:e1es7d$sap$3@ikaria.belnet.be...
>> On 2006-04-10, Ridge Burner <nospam@nospam.com> wrote:
>>> I'm looking for a SQL statement like so:
>>>
>>> $sql = "SELECT first 3 items for each UNIQUE user ORDER BY date_added
>>> ASC";
>> I can only think of a solution where you perform a subquery to get the
>> desired results. Which SQL-DBMS are you using? And which version? If i'm
>> not mistaken MySQL only supports subqueries since version 4.1.
>>
>> --
>> Met vriendelijke groeten,
>> Tim Van Wassenhove <http://timvw.madoka.be>
>
>
Google search gave me the following example.
SQL Server:
SELECT TOP 10 product, descr, email
FROM products
ORACLE:
SELECT product, descr, email
FROM products
WHERE ROWNUM <= 10
MySQL:
SELECT product, descr, email
FROM products
LIMIT 10
Google is yer friend!!!
Navigation:
[Reply to this message]
|