1.11M Members

mysql table array problems

 
0
 

I have been having problems with this code and i cant find out why
I am trying to add a new element to an array. it says it goes throu butwhen i check its empty:

$sql="UPDATE $title SET arole = CONCAT_WS(',', arole, '$name')
WHERE op = '$name'";

if (!mysql_query($sql,$con))
{
    die('Error: ' . mysql_error());
}
else
{
    echo "Point Placed<br>";
    echo "<a href='index.php'>Return to Login</a>";
}
 
0
 

Put this temporary debug code on line 3:

die("UPDATE $title SET arole = CONCAT_WS(',', arole, '$name') WHERE op = '$name'";);

Your query will get displayed with actual values. Copy it to the SQL window of phpmyadmin and see what you get when you run it. If there are errors you will get error messages there that will help you solving the problem.

Question Answered as of 1 Year Ago by broj1
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: