Jump to content

Recommended Posts

hi, how to perform mysql query and assign value into php variable ?

 

Table 1

-equipment

-....

-.....

 

Table 2

-equipment

-....

-....

 

now i want to assign the equipment value from table 1 to equipment on table 2. how to write the code in php?

 

 

or it is my code got error

 

$equipment = $_get['equipment'];

$query = "SELECT equipment FROM equipment WHERE equipment=$_GET['equipment']";

$query2 = "INSERT INTO report (equipment) values ($equipment)";

$result2 = mysql_query ($query2,$dblink);

 

echo $query2;

 

Guest
This topic is now 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.