Jump to content

$MembersType in an sql string as table name


brown2005

Recommended Posts

Hi,

 

I was just wondering how to write the code below so that where $MembersType is in the sql string can select different tables.

 

thanks

 

function CountMembers($MembersType)
{
  	
$CountMembers_sql = "

SELECT COUNT(*) AS CountMembers_Number 
FROM $MembersType_members  
LIMIT 1;

";


}

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.