NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
anli
Joined: 19 Nov 2008 Posts: 67
|
Posted: Sun Nov 29, 2009 12:58 pm Post subject: SQL Coomand, LIMIT is not accepted |
|
|
It's for current trunk.
Running this command
| Code: | SELECT *
FROM ...
LEFT JOIN ...
ON ...
WHERE ...
ORDER BY ...
LIMIT 20,10; |
rises error
| Code: | Error code 1064, SQL state 42000: 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 20 OFFSET 0' at line 7
|
Whithout LIMIT all do work. What have I missed? NB-supplied MySQL driver is in use. It seems NB inserts somewhere own 'LIMIT 20 OFFSET 0' to devide result set into pages. Where is that place to disable the division? |
|
| Back to top |
|
 |
elgarcho
Joined: 02 Mar 2010 Posts: 1
|
Posted: Tue Mar 02, 2010 5:33 pm Post subject: Solution? |
|
|
| Do you have a solution about this issue? Tks. |
|
| Back to top |
|
 |
anli
Joined: 19 Nov 2008 Posts: 67
|
Posted: Tue Mar 02, 2010 6:17 pm Post subject: |
|
|
| No, I have not. |
|
| Back to top |
|
 |
h2y1e0
Joined: 30 Jun 2010 Posts: 1
|
Posted: Wed Jun 30, 2010 10:41 am Post subject: |
|
|
I have had the same issue. A workaround would be to place the Limit part on the same line as last line. See the example.
| Code: | SELECT *
FROM ...
LEFT JOIN ...
ON ...
WHERE ...
ORDER BY ... LIMIT 20,10; |
I hope this helps. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|