RE: Special Insertion Into MySQL - at a loss!
| From: | SpyProductions Support Team | Date: | Thu, 21 Feb 2002 17:20:49 +0000 |
| Subject: | RE: Special Insertion Into MySQL - at a loss! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17145@lists.php.net to get a copy of this message | ||
>
> The following code is how you should retrieve the data from mySQL...
> if you wanted to update all of the information through one button,
> though, I would do it in a slightly different way...
>
> <?php
>
> $sql = "SELECT whatever FROM.... whatever...";
>
> $result = mysql_query($sql);
>
> while ($row = mysql_fetch_array($result)){
> $domain = $row[0]; // first item in array
> $cancel = $row[1]; // second item in array
> ?>
>
> <tr>
> <td><font size=2 face=Arial><?= $domain ?></font></td>
> <td><font size=2 face=Arial>Cancel This Domain?</font></td>
> <td><font size=2 face=Arial><input type=text name=confirm
> value='<?= $cancel ?>' size=3></font></td>
> </tr>
>
> <? } ?>
>
>
> as long as all these are from the same table... the update is easy...
>
Actually, the data is fetched based from table 2 based on data from table1 -
however, all of the data shown, being from table2, would be updated to table
2.
So, on the second page, when a 'submit' is done, the information would be
updated in mysql like....how? That is the major problem I am having - how
to keep the arrays in separate identities so that I can update row by row
into the table - based on domain name since they are all unique.
Thanks for your help,
-Mike