I always thought the first was the start recoed and the second was the last record.
I think 3,3 is wrong run an if statement to make sure the count variable is not equal to or greater to 3 this would confuse MySql's brain.
Below is a direct quote from the select syntax of the official mysql manual:
LIMIT {[offset,] row_count | row_count OFFSET offset}
As you can see, it makes an if statement. It can be broken down to two parts. The first is:
The above statement make just the row count and note that when something is in brackets it is an optional parameter optional. However, if you were to fill in the optional parameter, since there are now two parameters, the if statement would change to the following where the offset is at the end:
LIMIT {row_count OFFSET offset}
And now for the part that is confusing most people in this thread. An offset is never relative to the row_count. So say you wanted to limit from rows 6 to row 8 you would use
LIMIT 6, 2 as you are telling mysql how many rows to count on after six. That's what offset means in any language weather it's mysql, graphics, english etc.
So to explain what
LIMIT 3, 3 does. It will limit from result 3 to result 6 as it has counted three rows from result 3. I would have to say that if anything was the error it would be the table name.
As a test, try replacing line 12 of my previously posted script with the following and see what query it reports back:
$result = mysql_query('SELECT var1 FROM `'.mysql_real_escape_string($tab1).'` LIMIT '.mysql_real_escape_string($cnt).', 3')
or die('SELECT var1 FROM `'.mysql_real_escape_string($tab1).'` LIMIT '.mysql_real_escape_string($cnt).', 3<hr>'.mysql_error());