Hello
I am making a shopping cart and need a simple counter to add as an order number.
The cart table in phpmyadmin looks like:
zzzzzzzzzzzzzzzzzzz
Database my_cart - table simplecount running on localhost
SQL-query
SQL-query : [Edit]
SELECT * FROM `simplecount` LIMIT 0, 30
count count_id
24 1
zzzzzzzzzzzzzzzzz
so I know the counter is working.
However the code on the emailform where the counter information is transmitted looks like this:
zzzzzzzzzzzzzzzzzz
mysql_query("UPDATE simplecount SET count = (count + 1) WHERE count_id = 1",$con);
$thecounter = mysql_query( "SELECT count FROM simplecount WHERE count_id = 1;",$con);
zzzzzzzzzzzzzzzzzzzzzzzzzz
and produces the output:
ORDER NUMBER: Resource id #3
instead of
ORDER NUMBER: 24
which I would expect.
Any ideas please?
I am making a shopping cart and need a simple counter to add as an order number.
The cart table in phpmyadmin looks like:
zzzzzzzzzzzzzzzzzzz
Database my_cart - table simplecount running on localhost
SQL-query
SQL-query : [Edit]
SELECT * FROM `simplecount` LIMIT 0, 30
count count_id
24 1
zzzzzzzzzzzzzzzzz
so I know the counter is working.
However the code on the emailform where the counter information is transmitted looks like this:
zzzzzzzzzzzzzzzzzz
mysql_query("UPDATE simplecount SET count = (count + 1) WHERE count_id = 1",$con);
$thecounter = mysql_query( "SELECT count FROM simplecount WHERE count_id = 1;",$con);
zzzzzzzzzzzzzzzzzzzzzzzzzz
and produces the output:
ORDER NUMBER: Resource id #3
instead of
ORDER NUMBER: 24
which I would expect.
Any ideas please?