Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
safe_rows limit offset, maxrows
Help please
I putting together a plugin where I require ‘x’ amount of records to be shown on each page using the limit with an $offset and $maxrows value.
If the number of records retrieved is less than the $maxrows it repeats the retrieved records until it reaches the $maxrow amount??
Am I being thick or is this the way safe_rows works.
The sizeof($rs) is showing the value of $maxrows not the amount of records found.
Forever learning.
Offline
Re: safe_rows limit offset, maxrows
Can you set the fourth parameter in the safe_rows call (debug) to 1 or TRUE and post the SQL query that is displayed in the browser?
Offline
Re: safe_rows limit offset, maxrows
Opps I forgot about the debug setting. I have noticed from the outputted SQL query that a join was missing on one the 3 tables.
Sometimes I wish I had a simpler job.
Thanks for kicking my brain in gear. That’s one reason I love txp the community is great.
Forever learning.
Offline