Unix Technical Forum

FOUND_ROWS() returns wrong result

This is a discussion on FOUND_ROWS() returns wrong result within the MySQL General forum forums, part of the MySQL category; --> Hi, I've installed MySQL 5.0.27 on a LIVE environment while DEVELOPMENT runs a lower version, yes I know wrong ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:38 AM
Taco Fleur
 
Posts: n/a
Default FOUND_ROWS() returns wrong result

Hi,

I've installed MySQL 5.0.27 on a LIVE environment while DEVELOPMENT runs a
lower version, yes I know wrong thing to do.
I've run into quite a few issues which are causing me lots of problems, the
main one being that FOUND_ROWS() return a wrong result.

The queries in questions are

SELECT SQL_CALC_FOUND_ROWS
PI.productInfoIdentity
, PI.productInfoTypeIdentity
, PI.productCategoryIdentity
, PI.dateStamp
, PI.documentIdentity
, PIT.productInfoTypeTitle
, PC.productCategoryTitle
, D.documentTitle
, D.documentIdentity
, D.originalExtension
, D.originalName
, D.fileSize
FROM tbl_productinfo PI
INNER JOIN tbl_productinfotype PIT
ON PI.productInfoTypeIdentity =
PIT.productInfoTypeIdentity
INNER JOIN tbl_l_productcategory PC
ON PI.productCategoryIdentity =
PC.productCategoryIdentity
INNER JOIN tbl_document D
ON PI.documentIdentity =
D.documentIdentity
INNER JOIN tbl_l_country C
ON C.countryIdentity =
PI.countryIdentity AND PI.countryIdentity = 1
ORDER BY PC.productCategoryTitle
LIMIT 0, 10;

Which returns nothing

Second statement
SELECT FOUND_ROWS() AS value;

Returns 8, which is completely wrong. The numbers returned do not make any
sense either, as I have others that should return 0, but return 6 or some
other number.

Any help would be much appreciated.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com