Jump to content

doing only 10 while loops


jakebur01

Recommended Posts

I do not have the option that I know of to do a LIMIT 10 in my odbc query.

What do you mean exactly?  I'm asking because this would be the best option.

 

How can I get it to count the number of while loops and stop at 10?

Have a variable that increments each loop and have a condition to check whether it reaches 10.

Link to comment
Share on other sites

ProvideX!  I looked at the manual and I see why you want to do this in php.  Here's one way to do it:

 

$rowcount = 0;
while ($rowcount < 10 && odbc_fetch_row($rs))
{
  $rowcount++;
  # Process the row
}

Link to comment
Share on other sites

Any query you try to do with it is slow as all get out.  I was using navicat to import the item data over to MySQL and it has been loosing its connection during the middle of the transfer. There are a little over 100,000 items.  I know it can't be navicat, because I have imported from other ODBC connection types with about 300,000 rows and 20 or more columns.

 

I'm think about building some kind of custom update/transfer script with php.

 

Jake

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.