Hi

I am having a problem with the following line:

$query =  mysqli_query($link, "UPDATE `getgigs` SET `venue` = '$venue', `town` = '$town', `phone` = '$tel', `website` = '$web', `email` = '$email', `address` = '$add' WHERE `rock` = '$url'") or die("Error: ". mysqli_error($link). " with query ". $query);

It is telling me I have a syntax error here, but I cannot work out what it is.

Thanks for any help

Recommended Answers

It can fail if one of the values contains a single quote. Post the full query and the error.

Jump to Post

All 2 Replies

It can fail if one of the values contains a single quote. Post the full query and the error.

Yes @pritaeas is right. It may be failing because one of the value contains a single quote or special character.

Did you use mysqli_real_escape_string on the values you are passing to the query before paasing it to the query?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.