close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQL Limit function not working

Thread began 11/26/2010 7:08 am by acaciasd344844 | Last modified 12/06/2010 10:40 am by Jason Byrnes | 4348 views | 3 replies |

acaciasd344844

MySQL Limit function not working

Hi I wonder if you can help me. I am using the my sql count function in a recordset, but it displays the first row as a total count of the found set and then the following rows appear correctly with the found count. I have tried everything to sort this out in the sql statement and all that I could come up with was the MySQL limit function as in LIMIT 1, 100

This works when I test it within phpmyadmin, but it returns an error when added to the recordset statement. I think I know whats going on! is it because I have a Repeat Region on the page, and this sets the limit of the number of rows displayed.

My thinking was that I could use LIMIT 1, 100 as I did in phpmyadmin to hide the first row and display the rest. Can you help me out as I am unsure how to get round this.

Thanks in advance


john

Sign in to reply to this post

Jason ByrnesWebAssist

instead of using the limit function in the SQL, use the php mysql_data_seek function to move to the second record:

mysql_data_seek ($recordsetName, 1);


where recordsetName is the name of the recordset.

Sign in to reply to this post

acaciasd344844

MySQL Limit function

Originally Said By: Jason Byrnes
  instead of using the limit function in the SQL, use the php mysql_data_seek function to move to the second record:

mysql_data_seek ($recordsetName, 1);


where recordsetName is the name of the recordset.  




Thanks jason I managed a work around by editing the code "$query_limit_Recordsetlivecustomers = sprintf("%s LIMIT %d, %d", $query_Recordsetlivecustomers, $startRow_Recordsetlivecustomers, $maxRows_Recordsetlivecustomers);to " "%s LIMIT 2, 100" and it worked fine thanks. I will use the mysql data seek in future though.

Thanks again

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad to hear you got it working.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...