![]() |
[Solved] Strange DB results - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [Solved] Strange DB results (/showthread.php?tid=21396) |
[Solved] Strange DB results - El Forum - 08-08-2009 [eluser]spmckee[/eluser] So I'm bascially doing a simple "next" and "previous" links thing based on an "order" column I have in my table. What's really weird is that when I try to jump from order number "9" to "10", both ways, it reacts strangely. Here's my model: Code: function next($work_id){ Now, as you can see I am spitting out 4 results and echoing them, this is just for debugging. The result I get from the above is: nike-one-display (order #7) francis-francis-espresso-maker (order #9) intel-laptop (order #10) alpha-tech-medical-animation (order #11) /*---- I hit "next" ---*/ francis-francis-espresso-maker (order #9) intel-laptop (order #10) alpha-tech-medical-animation (order #11) leatherman-flashlights (order #21) /*---- I hit "next" ---*/ leatherman-flashlights (order #21) hagg-lake (order #22) wacom-tablet (order #23) As you can see it freaks out after #9 and bypassed #10 and #11. I can't for the life of me figure out why. Any ides? Also, I have a similar setup for "prev" and it does the exact same thing. Ugh! [Solved] Strange DB results - El Forum - 08-09-2009 [eluser]pistolPete[/eluser] Could you post the entire table with the sample data? [Solved] Strange DB results - El Forum - 08-09-2009 [eluser]spmckee[/eluser] Thanks for the help. Here is an image of the whole table. Sorry, it's a bit large. *removed* [Solved] Strange DB results - El Forum - 08-09-2009 [eluser]spmckee[/eluser] I think I figured it out. I think I am getting the next, greater "work_id" and not "order" but I'm still investigating. Edit: Yep that was it. Sheesh. thanks for the help anyhow. |