数据库未更新[关闭]

I am having some trouble with this php page, for some reason when i run it the query is not executed

<html>
<?php   
$link = mysql_connect('localhost', 'root');
if (!$link) {

    die('Could not connect: ' . mysql_error());

}

    for($i = 0; $i<$_GET['count'];$i++)
    {
     $query ="UPDATE `TEST.table` SET `Lan_ID` = '".$_GET[$i.'LanID'].
             "', `Switching` = '".$_GET[$i.'Switching'].
             "',`Own` = '".$_GET[$i.'Own'].
             "',`Division` = '".$_GET[$i.'Division'].
             "',`Switch_Number` = '".$_GET[$i.'Switch_Number'].
             "', `Telecom_Circuit_number` = '".$_GET    [$i.'Telecom_Circuit_number'].
             "', `Transmitter_Frequency` = '".$_GET[$i.'Trasmitter_frq'].
             "', `Receiver_Frequency` = '".$_GET[$i.'Receiver_frq'].
             "',    `Band_width` = '".$_GET[$i.'Band_width'].
             "', `Channel` = '".$_GET[$i.'Channel'].
             "', `Equipment` = '".$_GET[$i.'Equipment'].
             "', `Power` = '".$_GET[$i.'Power'].
             "', `Line_designation` = '".$_GET[$i.'Line_designation'].
             "', `Voltage` = '".$_GET[$i.'Voltage'].
             "', `Phase` = '".$_GET[$i.'Phase'].
             "', `Modulate` = '".$_GET[$i.'Modulate'].
             "', `Terms` = '".$_GET[$i.'Terms'].
             "', `Trap` = '".$_GET[$i.'Trap'].
             "', `Ltunner` = '".$_GET[$i.'Ltunner'].
             "', `Link` = '".$_GET[$i.'Link'].
             "', `Comment` = '".$_GET[$i.'Comment']."'";
     $query = $query. " " . $_GET['where'.$i];
    mysql_query($query, $link);

    }
    ?>
</html>

However, when i run the run the query on MYSQL workbench it does execute and it updates the data, i been trying to figure it out for about an hour and i have not found anything, Thank you for your help

Please heed the advice others have provided.

This is strongly suspect:

UPDATE `TEST.table` SET
        ^^^^^^^^^^

Normally, we don't use a period as a character in a table name.

I'm suspicious that what you wanted here was actually the name of a database, and the name of a table. The period delimiter does not get enclosed in the backticks, unless that is actually the name of the table.

UPDATE `TEST`.`table` SET
        ^^^^   ^^^^^  

That's the most likely explanation I can think of as to why you aren't seeing any rows updated in your database table.

The simplest way to debug this type of issue is to print out the actual string that is going to be sent to MySQL, immediately before you send it. (Or, when developing, instead of sending the query)

echo $query;

Also, best practice is to check whether your execution of the SQL statement threw an error or not, rather than pulling a Dr. Evil shut the door and pinky-to-the-corner-of-the-mouth "I'm just gonna assume it all went to plan. What?"

Again, please heed the advice others have provided. And beware of "Little Bobby Tables".

http://xkcd.com/327/