Seiryu -
Joined: 17 May 2016 Posts: 1
|
Posted: Tue May 17, 2016 11:09 pm Post subject: MYSQL command line returns empty set but fine on website |
|
|
Hi,
Have installed the Abyss web server to help with building my website database and generally learn PHP / SQL. I am quite new to this, so still finding my way.
I now have the server and SQL databses and tables set up. However, I have a small issue whereby sometimes a direct query (typed straight into the command line) returns an empty set with thousands of warnings. However, this database and table (and query) appears to be fine as the website itself loads data from the table fine in the browser.
On the flip side, sometimes I have an issue whereby the query will return all rows except the first on the website itself but the query into the command line will display fine. This seems to happen when I add and then delete some entries. I'm struggling to figure out exactly what is causing this. The entries are all checked for characters etc (it's only me inserting at the moment for testing).
What could cause this and why would one method work but not the other and then the opposite? ie. Website loads data fine, but command line shows error, or website misses first entry but command line displays fine?
For reference, I'm using 'SELECT * FROM table_name;'. The problem is certainly server side as the JSON returned has been tested in the browswr (where the first line is missing) and my PHP code has been checked and does not seem to be the issue.
Where do I begin to debug / repair this and would you have any idea what may cause this? Are there any tests I can do on the server, and is there a refresh etc function which will perhaps repair anything wrong with the database if this is what is required? |
|