Jump to content

perryeb

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

perryeb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Is it the 'ORDER BY' ? How do I write this So that it mixed the 5 id rows all up instead? Just removing 'ORDER BY' from it doesn't work.
  2. While any good random guys see this can you tell me how to mix up the 5 rows at a time randomly? so if 11 total rows it would be rows 5, 10, 1, 11, 3 or whatever on one refresh. Then all mixed up numbers to 11, with another 5 at a time on another refresh. All what I just listed is doing is pulling 5 rows in order randomly. So this code I just quoted is pulling rows 7, 8, 9, 10, 11, 12 on one refresh, and rows 1, 2, 3, 4, 5 or whatever on another refresh. So this is doing 5 at a time randomly but is putting the row id numbers in order. Where I want 5 at a time but like the first example I just said instead, I want the 5 ids pulled not in order, but all mixed up.
  3. I figured that's what you thought I was just doing thanks for trying to help. Yes those will both work that same exact way!
  4. Ding, Ding, Ding you win!!!!!!!!!!!!!! Thanks a lot that was it!!!!! $lastrow = mysql_query("SELECT SELECT MAX(id) FROM `business`"); $rand = mt_rand(1,$lastrow);
  5. Thank you very much but coders usually have a reason for asking something, why that won't work. I need to know the last rows id that is in a table, and then put that last rows id into the second field of mt_rand. $rand = mt_rand(0, ?);
  6. How do I find the last table row id, and put it into the second field of mt_rand this following clearly isn't working. Thank you very much.
  7. If you could make sure I can easily the code from the comments would help a lot because the way this forum copy and pastes it's too hard to tell. Unless someone has a trick on how the copy and paste works in this forum. So that things paste exactly the same way they copy, because for me in this forum things do not paste just how they are copied.
  8. Please post just the php that you posted in your pm to me. Because I couldn't separate out your comments from the code part. Is it just me or doesn't this forum let you copy and paste right? Because I keep having to separate all the lines. It doesn't show as is on here when I copy and paste. I couldn't separate your comments from the code in the pm. That would help a lot on your last php code, telling what the php code is from the comments. I'll have to pick this up tomorrow to punchy to think straight anymore today. Thanks a lot!!
  9. What you asked me before, the first code I listed yes it was by id that was automatic increment, so that if there were deleted records it would still pull any ids. Back to testing your last. If you need to break away to start again another day I understand. Maybe you're up late like I am.
  10. You keep getting closer. I got the table down to 24 rows to make it easier for me to test. Youre now pulling 5 rows at a time is good. First time was 1-5 pages overlapping listing the 5 rows. Some of the pulling of 5 rows at a time overlap also. What I mean.... Next page refresh was 4-8 rows. Next page refresh was 6-10 rows. Next page refresh was 8-12 rows. So it back up a few rows and then pulls 5 rows from there. When it gets to the the 8-12 rows it stops on that after all next page refreshes and doesn't keep going. I'll send that in a pm if that is too hard to explain so you can see what I mean.
  11. The session one like it is, shows 3 table rows the first time, then the next 2 rows directly after those on next page refresh, then the next 2 rows directly after the last 2 on next page page refresh. The after that do not show, nothing shows on the page after that, there are 49 rows in the table. Something else is happening though. When each table rows shows that I just said. It's printing the whole page 3 times as well. So it's not just sticking the 3 rows on the page. It's throwing 3 pages on top of each other to show the 3 rows. I can send you the basic template I'm using source in a pm if you want. Where you can add your own database column and password if you want. Even though what I first posted is not showing 5 rows at a time on each page refresh but all at once on the page, maybe there are a few ideas in that to combine with what you're doing. Let me know if you have any question on those, if you needed me to tell you something in those I just said more clear. Thank you very much.
  12. I tried sessions trying to compromise. I figure I can always change to cookies later if you have it working with sessions. Sounds like you like working with sessions, so I can always change later if I need to. Your sessons like you said is working better than the cookies example. But after 3 page refreshes everything disappears with your session one. So your session one looks like it's getting closer. Hopefully you know what that means. Thanks a lot.
  13. It didn't like this setcookie(); So I just removed it. It's showing the 3rd database row only and when I click on refresh, it's not showing the next 5 rows but still at 1 row only the third. You see before I had it showing 5 rows, but they were all showing on the page at the same time. Instead of showing 5 rows at a time on each refresh like I was trying to do. Do you know what is causing this? Or can you put explanations next to your values, so I know you're logic. I'm not good enough at this to know what your trying to do and your logic is without you putting explanations next to them or your knowing what's wrong. Thanks a lot for your help it is extremely appreciated.
  14. maybe it's currentrows, what is currentrows you have in the cookie?
  15. I added this just like you have it but with cookies instead, since I doubt a lot I'll know what I'm doing with the other. Nothing at all is appearing on the page. No error messages also. Was total rows in select supposed to be listed another way? Was I supposed to connect it to something I couldn't see you had, or to something I already had? Please let me know thank you very much.
×
×
  • 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.