Jump to content

[SOLVED] Multiple use of the same code


everlifefree

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.