Jump to content

Recommended Posts

Hello Thanks for any help any one can give Im very new to PHP..

 

I need to pull data for clients that share 2 diff services into one table.

 

mysql_select_db($database_pull, $pull);

$query_Recordset1 = "SELECT * FROM RR_services WHERE USER_ID='XXXXX' and ( GAME_ID = 'RR6261678786234' or GAME_ID = 'RR4148833526812' )";

$Recordset1 = mysql_query($query_Recordset1, $pull) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1 = mysql_num_rows($Recordset1);

?>

 

This does what i need but i have to define the USER_ID i would like it to search all users and just display results of those that have both services..

 

Thanks Again,

Link to comment
https://forums.phpfreaks.com/topic/182345-solved-filtering-tables/
Share on other sites

<?php
mysql_select_db($database_pull, $pull);
$query_Recordset1 = "SELECT * FROM RR_services WHERE GAME_ID = 'RR6261678786234' or GAME_ID = 'RR4148833526812'";
$Recordset1 = mysql_query($query_Recordset1, $pull) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>

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.