Sorry about previous post (some stupid shortcut key made it send)
Your row:
$sql = "INSERT INTO count VALUES('$dept', '$deptsub', '0');
should be:
$sql = "INSERT INTO count VALUES('$dept', '$deptsub', '0')";
You missed the double quotes.
Adam
--- Original Message ---
Hi,
for some reason
$sql="SELECT num FROM count where dept='$dept' AND
deptsub='$deptsub'";
begin of replace --
$result = mysql_query($sql,$db);
$page_count = mysql_num_rows($result);
# If does not exist in the database, insert a new entry
if (!$page_
'm getting the following error message:
Parse error: parse error in /home/./public_html/public/index.php on
line 25
(Which is the line: $sql="UPDATE count...)
Any thoughts would b most helpful.
Thanks,
Gav
-Original Message-----
From: Tatang Widyanto [mailto:[EMAIL PROTE
> if (!$page_count){
> $sql = "INSERT INTO count VALUES('$var1', '$var2', '0');
> }
>
> if (!mysql_num_rows($page_count)){
> $sql = "INSERT INTO count VALUES('$var1', '$var2', '0');
> }
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php