Zen Cart Logo
Forums / General Questions / Get amount of returned rows with $query->EOF ?

Get amount of returned rows with $query->EOF ?

Locked

Views: 873

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Feb 2012, 9:36 PM
#1
joecooper avatar

joecooper

Zen Follower

Join Date:
Aug 2011
Posts:
122
Plugin Contributions:
0

Get amount of returned rows with $query->EOF ?

Hi,

I have created a admin module to help with book keeping. I couldn't find one anywhere, and so created my own.

Basically its an order sheet with all the info of all the orders / fee's etc which is what our accountant requires. (got really fed up of doing this manually in excel).

All is working well, but i think it would be better to get a row count of all the orders returned (it uses date ranges).

I have used this to loop though all the returned rows:

while (!$orders->EOF) {

How do I find out how many items are inside $orders?

15 Feb 2012, 10:20 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Get amount of returned rows with $query->EOF ?

$orders->RecordCount()

15 Feb 2012, 10:20 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Get amount of returned rows with $query->EOF ?

joecooper,
Please don't repost the same question multiple times.
Follow ups to http://www.zen-cart.com/forum/showthread.php?t=192531