mysql - cannot use offset and limit in stored procedure -


currently using offset , limit retrieve limited data table, when move database development hosting server, show syntax error on query, if remove offset , limit syntax, work well. idea or solution on problem?

    select     e.a,     e.b,     e.c,     e.d,     e.e,     e.f,     e.g         t1 e     e.a = 1     order e.b desc     limit in_count     offset in_offset; 

enter image description here

as per official mysql site :

for compatibility postgresql, mysql supports limit row_count offset offset syntax.

i think syntax proper, problem may reside procedure variables being used in limit/offset clause, or way being interpreted database engine might have older incompatible version not interpret offset.

as alternative workaround, try using , comma separation in limit clause specify offset, might solve issue.

select     e.a,     e.b,     e.c,     e.d,     e.e,     e.f,     e.g         t1 e     e.a = 1     order e.b desc     limit in_offset,in_count; 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -