MarkT Posted May 29, 2014 Share Posted May 29, 2014 Hi, I have this code; <?PHP include "./system/connect.php" ?> <?PHP $check = mysqli_query($con,"SELECT * FROM index"); $check2 = mysqli_fetch_array($check); ?> However, on the website it gives this; Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/a5813772/public_html/index.html on line 13 Any ideas? Thanks Link to comment Share on other sites More sharing options...
MarkT Posted May 29, 2014 Author Share Posted May 29, 2014 Fixed, Index appears to be interpreted as something else. Resolved by using ' ' around the word index in the query. Link to comment Share on other sites More sharing options...
Ingolme Posted May 29, 2014 Share Posted May 29, 2014 Index is a reserved word in MySQL. You should wrap field names in backticks `, rather than quotation marks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now