Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 3:51 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > > So in your query, add this > > SELECT COUNT(*) as total FROM your_table > > Then in your code use this instead > > $rows = $rowcount['total']; > > This makes a little more sense then using the count(*) thing, to me at least

Re: [PHP] Row Count

2008-06-10 Thread Jim Lucas
Dan Shirah wrote: Sorry about the top posting. You my friend are a genious! $rows = $rowcount['(count(*))'] works like a charm! Thank you all. So in your query, add this SELECT COUNT(*) as total FROM your_table Then in your code use this instead $rows = $rowcount['total']; This makes

RE: [PHP] Row Count

2008-06-10 Thread Jay Blanchard
[snip] print_r($rowcount); returns Array ( [(count(*))] => 110796.0 ) and 110796 is the correct number of rows in my table, but that number isn't coming through the the variable. [/snip] Because ifx_fetch_row returns an array, not a value. -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Row Count

2008-06-10 Thread Dan Shirah
print_r($rowcount); returns Array ( [(count(*))] => 110796.0 ) and 110796 is the correct number of rows in my table, but that number isn't coming through the the variable. On 6/10/08, Daniel Brown <[EMAIL PROTECTED]> wrote: > > On Tue, Jun 10, 2008 at 1:43 PM, Dan Shirah <[EMAIL PROTECTED]> wrote

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 1:43 PM, Dan Shirah <[EMAIL PROTECTED]> wrote: > > I'm not getting any errors, but no number/data displays for $rows when it > should be telling me there is over 100,000 records. > > Any ideas why it isn't returning a number value for $rowcount[0]/$rows? Try to print_r(

Re: [PHP] Row Count

2008-06-10 Thread Dan Shirah
Okay, I decided to try the COUNT method since all I really wanted to get in the first place was how many rows would be returned for a specific query. So, I have the below: I'm not getting any errors, but no number/data displays for $rows when it should be telling me there is over 100,000 record

Re: [PHP] Row Count

2008-06-10 Thread Dan Shirah
Sorry about the top posting. You my friend are a genious! $rows = $rowcount['(count(*))'] works like a charm! Thank you all.

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
Quit top-posting, Shirah. You know better than that. ;-P On Tue, Jun 10, 2008 at 1:49 PM, Dan Shirah <[EMAIL PROTECTED]> wrote: > print_r($rowcount); returns Array ( [(count(*))] => 110796.0 ) and 110796 is > the correct number of rows in my table, but that number isn't coming through > the

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 12:42 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > Jim Lucas wrote: > > I should slow down also and make sure all is well with my messages before > sending. > > $query = 'SELECT COUNT(*) FROM brev_pending_summary_detail '; // BASIC QUERY Yeah that and quit stealing th

Re: [PHP] Row Count

2008-06-10 Thread Jim Lucas
Jim Lucas wrote: Dan Shirah wrote: Hello all, I am having a problem with trying to count the number of rows returned by my query. I connect to the database fine, my query displays and runs fine, but my row count is incorrect. If I do not put in any serch criteria and my basic query ends up

RE: [PHP] Row Count

2008-06-10 Thread bruce
jay... nah... jus that we saw the msg at the same time!!! a freak occurance. -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2008 8:30 AM To: Jay Blanchard Cc: Jim Lucas; Dan Shirah; php-general Subject: Re: [PHP] Row Count On Tue, Jun 10, 2008

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 11:27 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > He is using the ifx extension for an informix database, not mysql > [/snip] > > Dan was one of the ones who so clearly corrected me! Wow, are we all > rushing through stuff today?? I know. I should be ashame

RE: [PHP] Row Count

2008-06-10 Thread Jay Blanchard
[snip] He is using the ifx extension for an informix database, not mysql [/snip] Dan was one of the ones who so clearly corrected me! Wow, are we all rushing through stuff today?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 11:08 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: > Daniel Brown wrote: >> >> On Tue, Jun 10, 2008 at 10:54 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: >>> >>> Daniel Brown, did you read through this too quickly also??? >> >>Jim Lucas, what did I miss? >> > > He is using the i

Re: [PHP] Row Count

2008-06-10 Thread Jim Lucas
Daniel Brown wrote: On Tue, Jun 10, 2008 at 10:54 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: Daniel Brown, did you read through this too quickly also??? Jim Lucas, what did I miss? He is using the ifx extension for an informix database, not mysql -- Jim Lucas "Some men are born to gr

Re: [PHP] Row Count

2008-06-10 Thread Jim Lucas
Dan Shirah wrote: Hello all, I am having a problem with trying to count the number of rows returned by my query. I connect to the database fine, my query displays and runs fine, but my row count is incorrect. If I do not put in any serch criteria and my basic query ends up being "SELECT * FROM

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 10:54 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: > > Daniel Brown, did you read through this too quickly also??? Jim Lucas, what did I miss? -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, an

Re: [PHP] Row Count

2008-06-10 Thread Jim Lucas
Daniel Brown wrote: On Tue, Jun 10, 2008 at 10:11 AM, Dan Shirah <[EMAIL PROTECTED]> wrote: If I do not put in any serch criteria and my basic query ends up being "SELECT * FROM brev_pending_summary_detail" then the value of $rowcount is 110796. If one search criteria is used the value of $rowco

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 10:39 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > ifx_num_rows may be soon to be an included function. Does anyone else smell PECL's? ;-P -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VP

RE: [PHP] Row Count

2008-06-10 Thread Jay Blanchard
[snip] On Tue, Jun 10, 2008 at 10:18 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > http://www.php.net/mysql_num_rows That would be just peachy if it worked on his Informix database, Jay. ;-P [/snip] OK, OK...so I read it through too quickly! Then I would suggest a second query to count t

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 10:11 AM, Dan Shirah <[EMAIL PROTECTED]> wrote: > > If I do not put in any serch criteria and my basic query ends up being > "SELECT * FROM brev_pending_summary_detail" then the value of $rowcount is > 110796. If one search criteria is used the value of $rowcount becomes 110

Re: [PHP] Row Count

2008-06-10 Thread Daniel Brown
On Tue, Jun 10, 2008 at 10:18 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > http://www.php.net/mysql_num_rows That would be just peachy if it worked on his Informix database, Jay. ;-P -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! D

RE: [PHP] Row Count

2008-06-10 Thread bruce
jay... he's dealing with informix.. not sure if mysql/php calls apply. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2008 7:19 AM To: Dan Shirah; php-general Subject: RE: [PHP] Row Count [snip] I am having a problem with trying to coun

Re: [PHP] Row Count

2008-06-10 Thread Dan Shirah
Jay, I am querying an Informix database, not MySQL. When I count the rows against my MSSQL database I do use the mssql_num_rows function and it works great. I tried using the ifx_num_rows function with the ifx_fetch_row function but could not seem to get it to work, so instead I used the ifx_affe

RE: [PHP] Row Count

2008-06-10 Thread Jay Blanchard
[snip] I am having a problem with trying to count the number of rows returned by my query. I connect to the database fine, my query displays and runs fine, but my row count is incorrect. If I do not put in any serch criteria and my basic query ends up being "SELECT * FROM brev_pending_summary_deta