after searching in google and SO,i decided to put this here.. i tried changing single quote and backtick to column but it didn't help either.. any help appreciated!!!
$a=mysql_query("UPDATE exercisemember SET reps='$reps' WHERE memid='$memid1'") or die(mysql_error());
$b=mysql_query("UPDATE exercisemember SET sets1='$sets1' WHERE memid='$memid1'") or die(mysql_error());
Thanks in advances.. update 1 the member1 is actually the value of $memid1
As your title says, there is no colimn member1. What the problem could be is that you you have qoute in the $memid.
Please do an echo on $memid to see what is in the variabele.
Also you could better use pdo or mysqli
it will be something like this with pdo:
//database connection
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
$sql = 'UPDATE exercisemember SET reps=:reps WHERE memid=:memid';
$update = $dbh->prepare($sql);
$update->bindParam(':reps', $reps, PDO::PARAM_STR); //if it is a integer use PDO::PARAM_INT
$update->bindParam(':memid', $memid, PDO::PARAM_STR);
$update->execute();
This will prevent it from sql injection.
$a=mysql_query("UPDATE exercisemember SET reps='".$reps."' WHERE memid='".$memid1."'")
you can find difference using echo
query