Jump to content

Queries Good Practice


Network_ninja

Recommended Posts

hey guys.... Just have a question Is it advantageous or will do good if i make my tablename as a variable? For example:

 

$table1 = "first_table";
$table2 = "second_table";

 

Query:

$query = @mysql_query("SELECT * FROM $table1 ");

 

or does it still good practice if I write my queries like this:

$query = @mysql_query("SELECT * FROM first_table");

 

tnx everyone....

Link to comment
https://forums.phpfreaks.com/topic/245091-queries-good-practice/
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.