I have window
column in item
table and I want use this query but window
also mysql command. What can I do?
Query:
"SELECT pos, vnum FROM item WHERE owner_id='".$id_account."' AND window='MALL' ORDER by pos ASC ";
Error:
Error description: 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 'window='MALL'' at line 3
myfull code
include 'ayarlar.php';
$connforfunc = new mysqli($servername, $username, $password, 'player');
if ($connforfunc->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sqlforfunc ="SELECT pos, vnum FROM item WHERE owner_id='".$id_account."' AND 'window'='MALL' ORDER by pos ASC ";
if (!$connforfunc -> query($sqlforfunc)) {
echo("Error description: " . $connforfunc -> error);
}
$resultforfunc = $connforfunc->query($sqlforfunc);
while($row = $resultforfunc->fetch_assoc()) {
echo $row['pos'];
}