Lorne: Once the word spreads you beat up an innocent old man, well, the truly terrible will think twice before going toe-to-toe with our Avenging Angel. Spike: Yes. The geriatric community will be soiling their nappies when they hear you're on the case. Bravo.

'The Cautionary Tale of Numero Cinco'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


Betsy HP - Jan 01, 2003 7:38:59 pm PST #2506 of 10000
If I only had a brain...

I was leaning toward naked Spike but I think Shawn's suggestion is better.


DXMachina - Jan 01, 2003 7:45:35 pm PST #2507 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

Shawn, my suspicion is that another quote will stick there instead -- it's not like there's any code that points to it in specific. It's the randomising that's broken. I still can't work out how to unbreak it, though.

Thing is, it used to work properly, didn't it? I can remember sitting hitting reload again and again one time just to read the quotes, and I never noticed the repetition.


bon bon - Jan 01, 2003 7:48:02 pm PST #2508 of 10000
It's five thousand for kissing, ten thousand for snuggling... End of list.

It started doing it after ita, I think, added the full stop on request.


§ ita § - Jan 01, 2003 7:55:17 pm PST #2509 of 10000
Well not canonically, no, but this is transformative fiction.

It went freaky before that, according to [memfault]'s timeline. I didn't enter the full stop until recently. I also repacked the table, and changed the quote ID.


Jon B. - Jan 01, 2003 7:55:22 pm PST #2510 of 10000
A turkey in every toilet -- only in America!

the full stop on request.

The who with the what now?


bon bon - Jan 01, 2003 7:58:23 pm PST #2511 of 10000
It's five thousand for kissing, ten thousand for snuggling... End of list.

The who with the what now?

Whoops, I meant the full strap on request.

No, wait, that wasn't here.

(Someone asked her to add a period to the quote.)


John H - Jan 01, 2003 9:00:57 pm PST #2512 of 10000

It's the randomising that's broken.

ita, you can always do a more brute-force randomisation, like the ones that people used before mySQL introduced "order by random" with version 2.3 or whatever.

The recipe I'm using, on a 2.2 system, is:

srand((double) microtime() * 1000000);
$randomnumber = rand(1,$number_of_quotes);
$Query = "SELECT Charactername, Dialogue from Quotations where id=$randomnumber";

Where $number_of_quotes is a count of all the quotes.

Or you could just hard-code the number as the quotes DB doesn't change very often, and never without you knowing it.


Jon B. - Jan 01, 2003 9:03:58 pm PST #2513 of 10000
A turkey in every toilet -- only in America!

Or you could just hard-code the number as the quotes DB doesn't change very often, and never without you knowing it.

Weren't their plans to create a UI to add and correct quotes?


§ ita § - Jan 01, 2003 9:06:17 pm PST #2514 of 10000
Well not canonically, no, but this is transformative fiction.

Weren't their plans to create a UI to add and correct quotes?

It's on the list. I liked the current system because it only returns one row, and is neat and precise that way, and doesn't require much knowledge of the details of the quotes in the DB.

I don't want to return a recordset and run through it to a random point -- not every page.


John H - Jan 01, 2003 9:15:37 pm PST #2515 of 10000

plans to create a UI to add and correct quotes?

I volunteered. Mea culpa. I'll do it right now today if you let me do it non-object oriented! I just have a thing about OO. It's on my list of new year's resolutions along with Vietnamese.

I don't want to return a recordset and run through it to a random point -- not every page.

That's not what that code does though.

It picks a random number between one and the id of the last quote, then gets that quote.

Did the randomisation problem begin when you normalised the data, ita? Like now you're selecting the quote from one table and the ep title from another, right?