Re: insterting data into table.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Tarun

The problem you stated here is related to merging two tables into one. You want to do it with a php script page. But for this job, you don't need page redirection. Just get values form one table (table1) and then insert the values to another table (table2) using UPDATE command. Example follows (without noting connection):

$query1 = "SELECT * from table1";
$rows = mysql_query($query);

foreach($rows as $row)
{
$product_code_from_table1 = $row["product_code"];
$query2 = "UPDATE table2 SET field_1=value_1,...,field_n = value_n where product_code=$product_code_from_table1;"
}

Hope it will work...

BR
Masud

----- Original Message ----
From: Tarun <tarun.virgo@xxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx
Sent: Sunday, January 20, 2008 4:31:38 PM
Subject:  insterting data into table.

hello friends,

i have two diff tables. in mysql.

one table has ( product code , image path , product name)
2nd table has ( product code, size, other details)

now i want to make them a single table.

i thought that....i make a php script, which calls product code from one table, matches with other table, and then select the DETAILS from one table and insert in 2nd table

so i want to make a URL redirect script.

can you help me out to write a redirect script. or suggest me what is the automatic redirect code , which redirects to specified url in 2 seconds. So a automatic page reloading happens and data is transferred to another table.

Warm Regards,

Tarun

[Non-text portions of this message have been removed]





      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux