Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Error 1064

veloopity's profile image veloopity posted 1 week ago in General Permalink

After the last table modification (I added a unique index) I get this error when I click on "Daten" to see the data. Apparently this error can have a number of reasons but none of them seems to fit.

SQL Fehler (1064): 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 'limit 1000' at line 2

The unique index fields are filled correctly, there is no index violation.

I can make a SELECT * on the table and it displays all data correctly, everything seems correct, but the automatic display of data that is triggered by clicking on "Daten" won't work. What SQL is exactly happening when I click on "Daten"?

Any other idea how I can find what causes this error?

ansgar's profile image ansgar posted 1 week ago Permalink

The SQL should be visible in the bottom log panel.

veloopity's profile image veloopity posted 1 week ago Permalink

ah, you're right. It has a trailing WHERE where there shouldn't be one:

SELECT field1, field2, field3 FROM mydatabase.mytable WHERE LIMIT 1000;

no idea how that happened and if I can change it.

-Michael

Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 1 week ago Permalink

Oh, an empty WHERE clause? Is there perhaps some whitespace in the filter memo above the grid?

Also, which HeidiSQL version is it? Please ensure you are using the latest release at least.

veloopity's profile image veloopity posted 1 week ago Permalink

ah, yes! I had no idea this was possible. There was a blank in the filter field. I removed it and now it works. Thank you !!

Please login to leave a reply, or register at first.