0

dear all,

$member_id = $_POST['member_id'];
$delete = 'yes';

$HOST = 'localhost';
$USERNAME = 'root';
$PASSWORD = '';
$DB = 'hrs';


$link = mysqli_connect($HOST, $USERNAME, $PASSWORD, $DB);

$query = "UPDATE member SET delete='$delete' WHERE  member_id='$member_id'";

echo $query;


$result = mysqli_query($link, $query) or die(mysqli_error($link));

Any error in my query? it says You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use .
near 'delete='yes',member_type='none' WHERE member_id='19'' at line 1
However, This method i uses in other page is has no problem I have no idea what is the error, since everything is the same.

$query = "UPDATE members SET block='$active', role='$role' WHERE id='$id'";

your help is appreciated

Edited by qwertpink: n/a

2
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by simplypixie
0

Opps sorry wrong syntax error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete='yes' WHERE member_id='1'' at line 1
0

OMG YOU ARE RIHGT!

i've change delete to block, and everything works !
Thank you so much , i really appreciate

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.