it worked!
But still is not inserting the data to just one user, here is th new db :
Code: Select all
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`user_id` bigint(10) NOT NULL AUTO_INCREMENT,
`username` varchar(60) NOT NULL,
`password` varchar(60) NOT NULL,
`email` varchar(120) NOT NULL,
`xp` mediumint(15) NOT NULL,
`bank` bigint(10) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`user_id`, `username`, `password`, `email`, `xp`, `bank`) VALUES
(14, 'admin', '47bce5c74f589f4867dbd57e9ca9f808', 'aaa@aaa.aaa', 0, 0),
(15, 'admina', '47bce5c74f589f4867dbd57e9ca9f808', 'aaa@aaa.aaaa', 0, 0);
And i've let the script simple, i dont know where exactly to put the WHERE condition, fi ill put it here
Code: Select all
$sql = mysql_query("UPDATE users SET xp=(xp +'$xp') WHERE ....!?")or die(mysql_error());
what i should write after WHERE?