hi everybody,
i have this table:
CREATE TABLE pollTabelle (
pollID INTEGER AUTO_INCREMENT PRIMARY KEY,
userID INTEGER DEFAULT 0,
Frage TEXT,
Antwort TEXT,
zeitpunkt TIMESTAMP(10)
);
now, i have problems with "userID".
i want to read it out of my table. add 1 to it and write it back. what is wrong with my attempt?
<?php
require('connect.php');
$getUserID = "SELECT userID FROM polltabelle LIMIT 1";
$result = mysql_query($getUserID);
$result++;
$exUmfrage = explode("&", $umfrage);
for($i=0;$i<count($exUmfrage)-1;$i++){
$temp = explode("=", $exUmfrage[$i]);
$temp[1]=utf8_decode($temp[1]);
$query="INSERT INTO polltabelle (userID,Frage,Antwort) VALUES ('$result', '$temp[0]', '$temp[1]')";
mysql_query($query);
}
?>
thank you for your help,
waxinger