php-windows Digest 27 May 2009 04:56:02 -0000 Issue 3631
Topics (messages 29356 through 29357):
Re: Counting returned MySQL rows, and possibly storing returned recordset in a
session variable
29356 by: Jacob Kruger
Excel OLE Automation : accessing the Excel constants
29357 by: Faubry, Samuel
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Will look at the mysql_num_rows function.
Suppose I could try something like assigning the whole returned recordset to
an array that I then saved in a session variable, but depending on the size
of the returned data rows it might not be worth it in terms of load on the
server.
Am currently just looping through previously displayed rows and then
displaying the 'current' ones at this stage.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
----- Original Message -----
From: "James Crow" <ja...@ultratans.com>
To: "Jacob Kruger" <jac...@iburst.co.za>
Sent: Tuesday, May 26, 2009 4:47 PM
Subject: Re: [PHP-WIN] Counting returned MySQL rows, and possibly storing
returned recordset in a session variable
> Jacob Kruger wrote:
>> As far as I know/thought, you could include something like COUNT(*) in a
>> list of fields to be returned from MySQL to get told how many rows were
>> returned by mysql_query, but it doesn't seem to want to work on this
>> instance of MySQL I have here installed inside WAMP.
>>
>> Also, if I try assigning the result of mysql_query to a session variable,
>> the mysql_fetch_array function doesn't work since the result set hasn't
>> been assigned to the current mysql session or something - is there any
>> way to carry this over page to page without requerying the database
>> itsself?
>>
>> TIA
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...fate had broken his body, but not his spirit...'
>>
>>
>>
> Using count(*) should work. If you just want the number of rows returned
> by a query then use one of the mysql functions for that.
> SELECT & SHOW use mysql_num_rows()
> INSERT, UPDATE, DELETE, & REPLACE use mysql_affected_rows()
>
> I do no think you can carry a mysql_result set from one script to the
> next. At the end of script execution an implicit mysql_close is called.
> That would free any result sets that had not been freed during script
> execution. You could look at mysql_pconnect, but the comments about it
> seems to indicate that it has its own issues.
>
> Cheers,
> James
--- End Message ---
--- Begin Message ---
Hi,
I'm confronted to a new problem with Excel Automation: I don't manage to
access the constants.
For example, I want to find the last cell in a column:
ExcelSheet.Range("C65536").End(xlUp)
This fails because the constant xlUp is undefined...
There is some user contributed notes about that problem in the
documentation (http://jp2.php.net/manual/en/book.com.php) but it doesn't
say if it's possible to really access the Excel constants.
Thanks for your help !
Sam
--- End Message ---