quectionabout SELECT Part 3 117 php lesson

0 shamantha madusanka · October 8, 2015
mysql error qury not work proporly with new xammp version

$query = "SELECT 'food', 'calories' FROM 'food' ORDER BY 'id' ";


above query not work properly
eeror is

connected 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 ''food' ORDERBY 'id'' at line 1

Post a Reply

Replies

Oldest  Newest  Rating
0 Sid wadhwa · October 8, 2015
$query = "SELECT `food`, `calories` FROM `food` ORDER BY `id` ";


You have used    '  instead of   `
  • 1

PHP

107,152 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators