I am trying trying to update one of my tables using the following code.
@ $db=mysql_connect('home' ,'user1', 'password');
mysql_select_db('users');
$query = "update table1 set col1 = '$var1', col2='$var2' where col3='$var3' "; (there are 17cols and 17 vars)
$result = mysql_query($query) or die(mysql_error());
running the script gives me the following error
select command denied to user: 'user1@home.lan' for column 'col3' in table 'table1'. (home being my localhost name)
I have granted user1 the update privilege and have echoed the variables to make sure they are all being passed. I have also tried the same using delete and i get the same error message.
Am i missing something? Do i need to do anything different when using update/delete privileges?
thanks
bobb2468