Jump to content

query inside a query


NoobLaPHP

Recommended Posts

I have a select option and want to include it in my query.

$select = mysql_real_escape_string($_POST[select]);

if($fetch->where$select){

So if the select value was at 2 it would read

if($fetch->where2){
 

How would i do it? Would if($fetch->where.$select){ work putting in a . ?

 

also in the mysql 

 

mysql_query("UPDATE `table` SET `where$select`='input' ");

Link to comment
https://forums.phpfreaks.com/topic/287029-query-inside-a-query/
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.