Hello!...
How to use same code in many programs?
If I use same database but I usenew table in other program for example :
$host="localhost";
$user="root";
$password="xxxx';
$db='myDB";
mysql_pconnect($host,$user,$password);
$sql="drop table labreport";
$rn=mysql_db_query($db,$sql);
Create Table
$sql = "CREATE TABLE labreport (month varchar(20), ";
$sql .= "product_code varchar(20), ";
$sql .= "factory_code varchar(5), ";
$sql .= "factory_name varchar(20), ";
$sql .= "total_code int(4), ";
$sql .= "no_samp int(4), ";
$sql .= "item_code varchar(10), ";
$sql .= "item_name varchar(50), ";
$sql .= "item_type varchar(5), ";
$sql .= "amount int(4))";
$rn = mysql_db_query($db,$sql);
If I will use this myDB but change table to create
I will coding by any way...:function ..or include()
or any code to suitable
thank you for your instuction..
--