Getting a parse error >.<

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Wuggy
Forum Newbie
Posts: 4
Joined: Tue Mar 09, 2004 9:30 am

Getting a parse error >.<

Post by Wuggy »

include("common.php");
if(!($link_id = mysql_connect($db_host, $db_user, $db_password))) die(mysql_erorr());
mysql_select_db($db_name);
$wdbattle = mysql_query("SELECT * FROM wdbattle WHERE uid = 1);
$wdbattle = mysql_fetch_array($wdbattle);
$hp = $wdbattle[hp];
$hpleft = $wdbattle[hpleft];
$hpheal = "$hp - $hpleft";
mysql_query("UPDATE wdbattle SET hpleft=hpleft+$hpheal WHERE uid='$id'");

Parse error: parse error in /home/newbie/kiswebdesigns-www/wuggydesign/battle/hospital.php on line 13

I get a parse error, but what the hell is wrong, I've tried like everything, any ideas?[/php_man]
Wuggy
Forum Newbie
Posts: 4
Joined: Tue Mar 09, 2004 9:30 am

btw

Post by Wuggy »

The parse error is the mysql query
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

$wdbattle = mysql_query("SELECT * FROM wdbattle WHERE uid = 1");

You were missing the last "
Post Reply