Jump to content

Recommended Posts

OK, here the working code I have now:

// COUNT ALL VIDEO POSTS ///////////////////////////////////////////////////////////
$selectCount = myQ("SELECT SQL_CALC_FOUND_ROWS * 
FROM `[x]video` 
WHERE `user`='".me('id')."' ");
$countRowsSelectCount = myQ("SELECT FOUND_ROWS()");
$countRowsResultCount = mysql_fetch_row($countRowsSelectCount);
$totalRowsCount = $countRowsResultCount[0];

$tpl -> AssignArray(array(
	"video.total" => $totalRowsCount,
));

 

But I would like to make it so I can count 7 different things and I believe the array and everything will get mixed up unless I change each one a little bit. Please Help Let Me Know What I Need To change sorta like: $totalRowsCount = $countRowsResultCount[0]; is changed to $totalRowsCountG = $countRowsResultCountG[0]; or something like that...

 

One example of the 7 different things you could use this one to show me what I need to change and all

 

// COUNT ALL GALLERY POSTS ///////////////////////////////////////////////////////////
$selectCount = myQ("SELECT SQL_CALC_FOUND_ROWS * 
FROM `[x]gallery` 
WHERE `user`='".me('id')."' ");
$countRowsSelectCount = myQ("SELECT FOUND_ROWS()");
$countRowsResultCount = mysql_fetch_row($countRowsSelectCount);
$totalRowsCount = $countRowsResultCount[0];

$tpl -> AssignArray(array(
	"gallery.total" => $totalRowsCount,
));

Link to comment
https://forums.phpfreaks.com/topic/86611-solved-multiple-use-of-the-same-code/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.