1,105,375 Community Members

mysql table array problems

Member Avatar
CreatorZeus
Newbie Poster
22 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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>";
}
Member Avatar
broj1
Posting Virtuoso
1,578 posts since Jan 2011
Reputation Points: 220 [?]
Q&As Helped to Solve: 219 [?]
Skill Endorsements: 21 [?]
Featured
 
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: