Ask a Question related to ASP Database, Design and Development.
-
Laphan #1
Doing a Top 'x' with a MySQL Db
Although I know I can do a Top 'x' (x being the number I want) in Access and
SQL Server, I've been told that this isn't possible in MySQL. Is this true?
My ASP would only query a loop of say 5 recs anyway, but bringing the whole
lot back to do this seems messy.
Any ASP get-arounds if this is the case?
Thanks
Laphan
Laphan Guest
-
#40471 [NEW]: PHP 5.2.1 failed to be compiled with MySQl 5.0.33, MySQL 5.0.27, MySQL 5.1.15
From: pcdinh at gmail dot com Operating system: CentOS 4.4 PHP version: 5.2.1 PHP Bug Type: Compile Failure Bug description:... -
#40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ... -
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'... -
Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock' I got this trying to install DBI and DBD for mysql from... -
Seen this message? Can't connect to local MySQL server throughsocket '/tmp/mysql.sock'
Allen Marshall wrote: I just saw it in another newsgroup. Don't multi-post! -- Gunnar Hjalmarsson Email:... -
Manohar Kamath [MVP] #2
Re: Doing a Top 'x' with a MySQL Db
[url]http://dev.mysql.com/doc/mysql/en/SELECT.html[/url]
mySQL offers the LIMIT clause instead of the TOP clause. So, to retrieve top
5 rows, do:
SELECT * FROM myTable LIMIT 5;
--
Manohar Kamath
Editor, .netWire
[url]www.dotnetwire.com[/url]
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:40c22e29_3@127.0.0.1...and> Although I know I can do a Top 'x' (x being the number I want) in Accesstrue?> SQL Server, I've been told that this isn't possible in MySQL. Is thiswhole>
> My ASP would only query a loop of say 5 recs anyway, but bringing the> lot back to do this seems messy.
>
> Any ASP get-arounds if this is the case?
>
> Thanks
>
> Laphan
>
>
Manohar Kamath [MVP] Guest
-
Laphan #3
Re: Doing a Top 'x' with a MySQL Db
many thanks Manohar
Manohar Kamath [MVP] <mkamath@TAKETHISOUTkamath.com> wrote in message
news:O9ipcL#SEHA.3768@TK2MSFTNGP11.phx.gbl...
[url]http://dev.mysql.com/doc/mysql/en/SELECT.html[/url]
mySQL offers the LIMIT clause instead of the TOP clause. So, to retrieve top
5 rows, do:
SELECT * FROM myTable LIMIT 5;
--
Manohar Kamath
Editor, .netWire
[url]www.dotnetwire.com[/url]
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:40c22e29_3@127.0.0.1...and> Although I know I can do a Top 'x' (x being the number I want) in Accesstrue?> SQL Server, I've been told that this isn't possible in MySQL. Is thiswhole>
> My ASP would only query a loop of say 5 recs anyway, but bringing the> lot back to do this seems messy.
>
> Any ASP get-arounds if this is the case?
>
> Thanks
>
> Laphan
>
>
Laphan Guest



Reply With Quote

