Zen Cart Logo
Forums / General Questions / Amount of rows with $db->Execute?

Amount of rows with $db->Execute?

Views: 1,141

Results 1 to 8 of 8
15 Feb 2012, 9:45 PM
#1
joecooper avatar

joecooper

Zen Follower

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

Amount of rows with $db->Execute?

Using $db->Execute to do a database query, how do I get the amount of rows?

15 Feb 2012, 10:19 PM
#2
swguy avatar

swguy

Administrator

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

Re: Amount of rows with $db->Execute?

$foo_query = $db->Execute("SELECT bla bla bla");
$records = $foo_query->RecordCount();

15 Feb 2012, 10:22 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Amount of rows with $db->Execute?

joecooper:

Using $db->Execute to do a database query, how do I get the amount of rows?
You already asked the same question in another thread. http://www.zen-cart.com/forum/showthread.php?t=192530

Please don't post the same question in multiple places ... it's akin to spam.

15 Feb 2012, 10:37 PM
#4
joecooper avatar

joecooper

Zen Follower

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

Re: Amount of rows with $db->Execute?

Due to the inability to edit posts (which is very uncommon of forums), I decided to post again, as I had put the wrong information on the post.

15 Feb 2012, 10:37 PM
#5
joecooper avatar

joecooper

Zen Follower

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

Re: Amount of rows with $db->Execute?

Thanks :)

15 Feb 2012, 10:46 PM
#6
joecooper avatar

joecooper

Zen Follower

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

Re: Amount of rows with $db->Execute?

Ignore, thanks again

16 Feb 2012, 12:00 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Amount of rows with $db->Execute?

Posts can be edited for seven minutes (I would like it a bit longer:). After that, responses will refer to the original content and if the post is edited significantly after responses, the thread may become confusing or meaningless. New info should be given later in the thread. If you have a real need for something to be edited, you can ask for a moderator to do it.

16 Feb 2012, 3:47 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Amount of rows with $db->Execute?

As gjh42 said, if you edit the original text then it changes the context of any replies, and is thus renders them meaningless.
Simplest and best way to add more information is to post a reply containing that additional information.