Hi!
I'm pretty new in a PostgreSQL.
Any ideas what's wrong with that?
<?php
if(pg_num_rows($result)!=0) {$NNN=pg_Result($result,0,"hits")+1; $result = pg_exec($conn, "update adviews set hits=$NNN where adid=$id");}
else {$NNN=1;$result = pg_exec($conn, "insert into adviews values ($id,1)");}
pg_close($conn);
echo "<font face=\"Arial\" size=\"1\">Your AD has been viewed by $NNN people</font>";
?>
Warning: pg_num_rows(): supplied argument is not a valid PostgreSQL result resource in /var/www/development/photos.php on line 60
Warning: pg_exec(): supplied argument is not a valid PostgreSQL link resource in /var/www/development/photos.php on line 61
Warning: pg_close(): supplied argument is not a valid PostgreSQL link resource in /var/www/development/photos.php on line 62
Your AD has been viewed by 1 people
Thank you
I'm pretty new in a PostgreSQL.
Any ideas what's wrong with that?
<?php
if(pg_num_rows($result)!=0) {$NNN=pg_Result($result,0,"hits")+1; $result = pg_exec($conn, "update adviews set hits=$NNN where adid=$id");}
else {$NNN=1;$result = pg_exec($conn, "insert into adviews values ($id,1)");}
pg_close($conn);
echo "<font face=\"Arial\" size=\"1\">Your AD has been viewed by $NNN people</font>";
?>
Warning: pg_num_rows(): supplied argument is not a valid PostgreSQL result resource in /var/www/development/photos.php on line 60
Warning: pg_exec(): supplied argument is not a valid PostgreSQL link resource in /var/www/development/photos.php on line 61
Warning: pg_close(): supplied argument is not a valid PostgreSQL link resource in /var/www/development/photos.php on line 62
Your AD has been viewed by 1 people
Thank you