Jump to content

User forum posts, read from two different tables


crazy/man

Recommended Posts

I have two forums, using same database but under different prefix.

 

forum1 works under prefix f1_

forum2 works under prefix f2_

 

how to combine users posts from both forums, so when user posts on forum1 , he will have increased forum posts count on second forum too.. if you can understand me.

 

i tried something like this.. but it doesnt work.

 

	$posts1=mysql_fetch_array(safe_query("SELECT postID FROM ".f1_."forum_posts WHERE postID='".$id."' AND poster='".$userID."'"));
$posts2=mysql_fetch_array(safe_query("SELECT postID FROM ".f2_."forum_posts WHERE postID='".$id."' AND poster='".$userID."'"));
$posts=$posts1+$posts2;

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.