![]() |
Query help
For The Ultimate Quote hack by Kurafire, the quotes are shown randomly using this query.
PHP Code:
[They each have an id and ORDER BY id doesn't seem to be working :/] Thanks |
Quote:
|
That gives an error. I tried ORDER BY id DESC - but now it just shows the last quote added
|
Quote:
PHP Code:
|
If that doesn't work, maybe this will?
PHP Code:
|
Still no luck - thanks anyway
|
geniuscrew, to download hacks and get support you will need to go to this page and enter your email address, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you. |
sorry i just changed my email and fogot to update the thing -
Back on topic: can anyone help please? |
Take out the LIMIT 1 - that only limits it to 1 entry.
|
I think they only want them to list 1 at a time but in order and not randomly, if I understood right, that is.
|
Yup that's right Boofo :)
|
Use this:
PHP Code:
|
Quote:
Let me know how it works, geniuscrew. |
Actually Boofo even though you didn't say, I was putting the id bit in the SELECT part [at the beginning] ;)
Still it's only showing the last quote. :/ |
That is because that is what you wanted. The query chooses the very last quote listed.
Change DESC to ASC will make it choose the first quote listed. But it will not be random. It will always choose the first quote, or last quote. |
So there's no way of making it go through the list of quotes and display them one by one?
If not how do i make it even more random? Thanks for the help guys. |
Quote:
|
you could add another column that would display if it's been listed yet, not sure how to make it more random though
|
Mr E: But would that let the same quote be used twice?
Boofo: Is that the most randomest of randoms? :) I did try it before ya know and it worked, but wasn't what I was looking for. But I'll use it :P Thanks ppl. |
According to the mySQL site, that is more random than the old way (with RAND() alone) ever was. The seed needs to be there now and this is the automatic way to do it. It's all I use anymore and I have noticed a world of difference. But then I have over 642 quotes, so that helps. I use this for the member of the day hack and it makes a big difference there, too. Try it for a few days and let me know what you think. You will be amazed. ;)
|
Ah- Hah - I thought I needed to add more quotes - I only have 4 and now it's sitting nicely ont the second one -_- - I'll add more and get back to ya.
Thanks for all your help and for putting up with my annoyance for that matter lol Peace. |
No problem. Happy to help. ;) Keep me posted.
|
@geniuscrew you'd add another column with default of 0 then after it's displayed the quote the column would be set to 1, after all the columns are one, then all columns would be set back to 0 and everything would start over again
|
Quote:
You can do this by adding a new column to the user table, and saving the quoteid that the member has looked at, and just add 1 after that OR use cookies to save the information. Either way, it can be done, but would take some effort. :) |
Thanks Mr E and Erwin. Unfortunately I don't have the brains to do that kinda stuff.
|
All times are GMT. The time now is 11:46 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|