ght
> -Original Message-
> From: Dwight Altman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 05, 2006 9:53 AM
> To: 'php-db@lists.php.net'
> Subject: RE: [PHP-DB] LIMIT
>
> So how do I get this information on the PHP side?
>
> mysql> SELECT SQL_
doc/refman/4.1/en/information-functions.html
http://www.mysqlfreaks.com/statements/101.php
Regards,
Dwight
> -Original Message-
> From: Chris [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 30, 2006 9:46 AM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] LIMIT
>
> I
06 9:53 AM
> To: 'php-db@lists.php.net'
> Subject: RE: [PHP-DB] LIMIT
>
> So how do I get this information on the PHP side?
>
> mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name
> -> WHERE id > 100 LIMIT 10;
> mysql> SELECT FOUND_ROWS();
>
> I co
Bastien Koert wrote:
Your example predicates that the resultset it passed to an array which
you then take the size of, which would only give you the LIMIT value if
that clause is specified in the query...
I see, I misunderstood the OPs question then they wanted to know that
there are 2500
Your example predicates that the resultset it passed to an array which you
then take the size of, which would only give you the LIMIT value if that
clause is specified in the query...
Bastien
From: "JupiterHost.Net" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: Re
I am not sure that any dbs will do thati usually run two queries (one
for the limit data and one for the total rows)
Bastien
From: "chris smith" <[EMAIL PROTECTED]>
To: "Dwight Altman" <[EMAIL PROTECTED]>
CC: php-db@lists.php.net
Subject: Re: [PHP-DB] LIMI
chris smith wrote:
On 7/1/06, Dwight Altman <[EMAIL PROTECTED]> wrote:
Thanks, but that's an additional query.
I was wondering if there may be a PHP function that can operate on the
$result or perhaps $link of the single query that uses a LIMIT clause and
I'm not sure how this would be don
On 7/1/06, Dwight Altman <[EMAIL PROTECTED]> wrote:
Thanks, but that's an additional query.
I was wondering if there may be a PHP function that can operate on the
$result or perhaps $link of the single query that uses a LIMIT clause and
have the information [count(*) had there not been a LIMIT c
en though there was a LIMIT clause]. Something
like mysql_info.
Regards,
Dwight
x2407
> -Original Message-
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 29, 2006 5:46 PM
> To: Dwight Altman
> Cc: php-db@lists.php.net
> Subject: Re: [PHP-DB] LI
If you're using MySQL then:
SELECT SQL_CALC_FOUND_ROWS * FROM aTable LIMIT 5
SELECT FOUND_ROWS()
It's in the mysql documentation under SELECT syntax I believe.
Chris
Dwight Altman wrote:
Is there a way to get the number of rows that would have been returned had
there not been a LIMIT clause i
What about 'select count(*) from aTable'
- Frank
> Is there a way to get the number of rows that would have been returned
had
> there not been a LIMIT clause in a SELECT statement?
>
> For example, if
> Query #1) SELECT * FROM aTable
> would normally return 100 rows. But
> Query #2) SELECT * FR
Is there a way to get the number of rows that would have been returned had
there not been a LIMIT clause in a SELECT statement?
For example, if
Query #1) SELECT * FROM aTable
would normally return 100 rows. But
Query #2) SELECT * FROM aTable LIMIT 5
will return 5 rows. Is there a way to find out
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gavin Amm wrote:
> I'd like to avoid having to manually add all of the cols to the select
> statement if possible, so if there's a universal command I can put in
> that'd be best.
In that case, what I would do is just do your SELECT statement, sans th
30, 2006 12:51 PM
To: Gavin Amm; php-db@lists.php.net
Subject: Re: [PHP-DB] Limit chars from select
Gavin Amm wrote:
> How do I limit the characters a Select statement returns?
> In Seudo code:
> SELECT * FROM myTable LIMITCHARS 30;
>
> I'm using MySQL.
>
> Thanks.
>
Do yo
Gavin Amm wrote:
> How do I limit the characters a Select statement returns?
> In Seudo code:
> SELECT * FROM myTable LIMITCHARS 30;
>
> I'm using MySQL.
>
> Thanks.
>
Do you want to limit the characters from an individual field? If so, then
SELECT SUBSTRING(FIELD1 FROM 1 FOR 30) FROM myTable
How do I limit the characters a Select statement returns?
In Seudo code:
SELECT * FROM myTable LIMITCHARS 30;
I'm using MySQL.
Thanks.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: "Marie Osypian" <[EMAIL PROTECTED]>
> I don't want to use the limit on this query anymore. What I want is to
> display all that are dated within the last 3 months. What would be the
easy
> way to do that?
>
>
> SELECT federal_development_id, UNIX_TIMESTAMP(date) AS date, topic, body
>
If it is a unix timestamp, why not just select rows where the date is >= 7776000
(which is 90 days) or if you want to be specific about the months, use mktime()
to generate the timestamp for the date 3 months ago.
--
Adam Alkins
http://www.rasadam.com
Quoting Marie Osypian <[EMAIL PROTECTED]>:
I don't want to use the limit on this query anymore. What I want is to
display all that are dated within the last 3 months. What would be the easy
way to do that?
SELECT federal_development_id, UNIX_TIMESTAMP(date) AS date, topic, body
FROM federal_developments
> I would like to know how I limit my answer from a mysql database query to
> display only a limited size? Is this done in the query or the php?
>
> i.e. Our Performance Results area includes First Quarter 2003 investment
> returns for virtually every 529 savings programs. See how your 529 plan
>
ard [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 20, 2003 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Limit return Size
>
>
> Try:
>
> $sql = "SELECT LEFT(columnName,255) FROM tableName";
>
> Using that syntax should return the first 255 cha
m: Marie Osypian [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 20, 2003 3:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Limit return Size
>
>
> I would like to know how I limit my answer from a mysql
> database query to
> display only a limited size? Is this done
I would like to know how I limit my answer from a mysql database query to
display only a limited size? Is this done in the query or the php?
i.e. Our Performance Results area includes First Quarter 2003 investment
returns for virtually every 529 savings programs. See how your 529 plan
performed.
Also, since Sybase ASE uses a lot of the same T-SQL constructs, you can
attempt some methods located here:
http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12
--
Matt
"Noam Giladi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> a solution offered i recei
l :)
>
> -Original Message-
> From: Noam Giladi [mailto:[EMAIL PROTECTED]]
> Sent: woensdag 19 februari 2003 16:00
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] "LIMIT" problem MSSQL
>
>
> I'm trying to split results into different pages and number the pages
Well if you do, (sort by id) this will work.
On Wed, 2003-02-19 at 11:14, Noam Giladi wrote:
i'm not using a fixed sort
tnx noam
"Adam Voigt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Assuming your sorting by id, just do:
i'm not using a fixed sort
tnx noam
"Adam Voigt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Assuming your sorting by id, just do:
SELECT TOP 50 * FROM TABLE WHERE id > $lastid
And just have lastid posting to the page every time
they hit next,
Assuming your sorting by id, just do:
SELECT TOP 50 * FROM TABLE WHERE id > $lastid
And just have lastid posting to the page every time
they hit next, and in lastid, put the last id of the results
on that page.
On Wed, 2003-02-19 at 09:59, Noam Giladi wrote:
I'm trying to sp
> > $sql = "SELECT * FROM bla Limit $start, $numbers_to_show";
> >
> > or just go to mysql.com and use the manual :)
> >
> > -Original Message-
> > From: Noam Giladi [mailto:[EMAIL PROTECTED]]
> > Sent: woensdag 19 februari 2003 16:00
> >
From: Noam Giladi [mailto:[EMAIL PROTECTED]]
Sent: woensdag 19 februari 2003 16:00
To: [EMAIL PROTECTED]
Subject: [PHP-DB] "LIMIT" problem MSSQL
I'm trying to split results into different pages and number the pages
accordingly. I've been able to build a fairly intellige
$start = 10;
$numbers_to_show = 25;
$sql = "SELECT * FROM bla Limit $start, $numbers_to_show";
or just go to mysql.com and use the manual :)
-Original Message-
From: Noam Giladi [mailto:[EMAIL PROTECTED]]
Sent: woensdag 19 februari 2003 16:00
To: [EMAIL PROTECTED]
Subjec
I'm trying to split results into different pages and number the pages
accordingly. I've been able to build a fairly intelligent page numbering
system which knows which rows it should pull (at least by numbering each row
numerically) but I don't know how to construct a SQL query to pull 10
results
w to do LEFT(RIGHT) JOIN.
>
> Good luck.
>
> Andrey
>
> - Original Message -
> From: "Andy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 31, 2002 6:29 PM
> Subject: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes for
http://www.mysql.com/doc/
about joins and how to do LEFT(RIGHT) JOIN.
Good luck.
Andrey
- Original Message -
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 31, 2002 6:29 PM
Subject: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes
ssage -
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 31, 2002 6:29 PM
Subject: [PHP-DB] LIMIT 0,10 retrieves 10 records, but takes forever!
> Hi there,
>
> I am having a problem understanding how limit works. As I thought limit
>
Hi there,
I am having a problem understanding how limit works. As I thought limit
restricts the amount of results
to a given number. True.. the number of results is only that high how high I
specify it with limit.
But the querry takes as long as without limit. I am trying to avoid to long
waitin
Quoting from the MySQL manual:
In MySQL Version 3.23, you can use LIMIT # to ensure that only a given
number of rows are changed.
So then, it's LIMIT # instead of LIMIT #,#
Obviously, the way around it would be using WHERE instead of LIMIT, but
I don't know your table structure so I can't provid
PDATE catalogs SET PROCESSED = 'Y' LIMIT $i,10"
would have to be
"UPDATE catalogs SET PROCESSED = 'Y' LIMIT $i"
-Original Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 11:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB]
when I try to do the update with a limit on which records, it gives me a
sytax error on the limit, is there anyway to get around this?
UPDATE catalogs SET PROCESSED = 'Y' LIMIT $i,10
thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
On Monday 14 January 2002 19:21, Markus Lervik wrote:
> Damnit.
> Forgot to cc to the list, again. Here it is.
>
> -- Forwarded Message --
>
> On Monday 14 January 2002 12:55, you wrote:
> > hi guys, just looking for verification on this, as i don't think there's
> > any way to
Damnit.
Forgot to cc to the list, again. Here it is.
-- Forwarded Message --
On Monday 14 January 2002 12:55, you wrote:
> hi guys, just looking for verification on this, as i don't think there's
> any way to do it
>
> Basically, i want to return the results for a search,
On Monday 14 January 2002 19:06, matt stewart wrote:
> but presumably if i'm doing a SELECT count(*) FROM Designs WHERE Keywords
> LIKE "%sport%"
> followed by a SELECT * FROM Designs WHERE Keywords LIKE "%sport%" LIMIT
> 0,20
>
> it's still using nearly as much processing time as just returning a
g a get_num_rows and then only using the first 20?
-Original Message-
From: Jonatan Bagge [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2002 11:00
To: matt stewart
Subject: Re: [PHP-DB] LIMIT and get_num_rows
First do a SELECT count(*) from tablename;
This will get the number of entries.
hi guys, just looking for verification on this, as i don't think there's any
way to do it
Basically, i want to return the results for a search, but only return the
first 20 results from the start number given
LIMIT $start, 20
BUT... i'd like to have a page 1-whatever so if there are 65 re
i wanna limit the result for 10 records per page.
if anyone have a script doing this.
if i said for example limit 0,10
how in next page i'll get next ten?
--
PHP Data
left(timestamp,6)
- Original Message -
From: "Jeff Oien" <[EMAIL PROTECTED]>
To: "PHP-DB" <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 11:33 PM
Subject: [PHP-DB] Limit Select Field Characters?
> I have a timestamp field that looks like thi
$fulldate = date("dmy");
echo $fulldate;
-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001 23:34
To: PHP-DB
Subject: [PHP-DB] Limit Select Field Characters?
I have a timestamp field that looks like this
0109011754
but I on
I have a timestamp field that looks like this
0109011754
but I only want to compare
010801
when doing a SELECT. Is there a way I can do this? Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PR
Hello,
Luigi Barone wrote:
>
> I have the same problen of Fredrik
> Is there any equivalent to MySQL's ?LIMIT x,y? in Informix Dynamic Server
> 2000?
As you may have noticed, I have just replied a similar message but about
MS-SQL. The same Metabase base solution can work for Informix because
Me
Hello.
Fredrik Wahlberg wrote:
>
> Is there any equivalent to MySQL's ?LIMIT x,y? in Microsoft SQL-Server?
You need to use server side cursors. You may want to look at how
Metabase, the PHP database abstraction package does it when using
MS-SQL. For Metabase users, it is as simple as calling th
But with TOP I can't start on any row I want? I would like to be able to
select rows 40 through 60 or something similar.
/F
>>>>>>>>>>>>>>>>>> Ursprungligt meddelande <<<<<<<<<<<<<<<<&
Yep there is- its called TOP
Example:
SELECT TOP 2 *
FROM Table
Fredrik Wahlberg wrote:
> Is there any equivalent to MySQL's ?LIMIT x,y? in Microsoft SQL-Server?
>
> /Fredrik
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional
I think so, but check the SS lang manual. It should be under the syntax for
SELECT, maybe it's called "TOP". Haven't worked with SS for a while.
MIles
At 02:24 PM 3/12/01 +, Fredrik Wahlberg wrote:
>Is there any equivalent to MySQL's "LIMIT x,y" in Microsoft SQL-Server?
>
>/Fredrik
>
>--
>PH
I have the same problen of Fredrik
Is there any equivalent to MySQL's LIMIT x,y in Informix Dynamic Server
2000?
thanks Luigi
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list ad
Is there any equivalent to MySQL's LIMIT x,y in Microsoft SQL-Server?
/Fredrik
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
MaxClients in httpd.conf reduces your total server performance in case you
have not only db-actions but also images and plain files ...
if you use something other than ocilogon you open a persistant link that
might not be closed. (try using ocilogon instead of eg ociplogon)
close every connectio
MaxClients inyour httpd.conf is a nice way to limit it. :)
Karsten Dambekalns wrote:
>
> On Thu, Jan 25, 2001 at 08:22:07PM +0100, Matthias Kopolt wrote:
> > Are you useing persistent connections (I had no real luck with them)?
> >
> > How do you connect to your DB over Multi Threaded Server (M
On Thu, Jan 25, 2001 at 08:22:07PM +0100, Matthias Kopolt wrote:
> Are you useing persistent connections (I had no real luck with them)?
>
> How do you connect to your DB over Multi Threaded Server (MTS) or Dedicated
> Server ?
I am just using phplib for the dirty stuff :) So I don't know exactl
/toc.htm
mk
> -Ursprüngliche Nachricht-
> Von: Karsten Dambekalns [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 25. Januar 2001 20:09
> An: PHP Database
> Betreff: [PHP-DB] Limit number of persistent oci8-connections?
>
>
> Hi!
>
> I am using PHP to conne
Hi!
I am using PHP to connect to an Oracle 8.1.5 database. Everything works
fine, but the load on the oracle server is insanely high. So I would like to
limit the number of connections. Is there something like the mysql
max_persistent_connections statement?
TIA,
Karsten
BTW: Has some used sqlre
60 matches
Mail list logo