re: multiple queries in PHP ????
| From: | JeRRy | Date: | Wed, 26 Mar 2003 08:57:09 +0000 |
| Subject: | re: multiple queries in PHP ???? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26630@lists.php.net to get a copy of this message | ||
ignore this, I no longer require assistance on the
message below.
l
> ATTACHMENT part 6 message/rfc822
> Date: Wed, 26 Mar 2003 19:41:32 +1100 (EST)
> From: JeRRy <jusa_98@yahoo.com>
> To: php-db@lists.php.net
> Subject: re: multiple queries in PHP ????
>
> Hi,
>
> This is what I have so far.
>
> <?
> if ($REQUEST_METHOD == "POST") {
> $usr = "usr";
> $pwd = "pwd";
> $db = "db";
> $host = "localhost";
>
> $cid = mysql_connect($host,$usr,$pwd);
> mysql_select_db($db);
>
>
> // NOTE that form fields automatically
> become variables
>
>
> $sql = "UPDATE round1 SET score=score+1 WHERE
> $select='$winner'";
>
> mysql_query("$sql");
> echo("Points credited? I
> hope!<br><br>");
> }
> else {echo("An error occoured, please click back
> button and try again.");}
> ?>
>
> Now is this right?
>
> <?
> if ($REQUEST_METHOD == "POST") {
> $usr = "usr";
> $pwd = "pwd";
> $db = "db";
> $host = "localhost";
>
> $cid = mysql_connect($host,$usr,$pwd);
> mysql_select_db($db);
>
>
> // NOTE that form fields automatically
> become variables
>
>
> $sql = "UPDATE round1 SET score=score+1 WHERE
> $select='$winner'";
>
> if (match) {
> $sql = "UPDATE round1 SET score=score+1 WHERE
> $select='$winner':
> $sql = "UPDATE profile SET update_table2;
> }
>
>
> mysql_query("$sql");
> echo("Points credited? I
> hope!<br><br>");
> }
> else {echo("An error occoured, please click back
> button and try again.");}
> ?>
>
>
> http://mobile.yahoo.com.au - Yahoo! Mobile
> - Check & compose your email via SMS on your Telstra
> or Vodafone mobile.
>
http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.