Joined February 2013
·

Gor

I design. I code. The web. at SAIC-Frederick
·
Frederick, MD
·
·
·

Posted to Don't waste time on XML, json ftw over 1 year ago

XML is an awful model. Unfortunately, we're still stuck with XML floating around out there. @invalidka, you nailed it... it's downright scary when decision makers fall behind on current technology trends.

Posted to Random Rows From MySQL over 1 year ago

It's ok David, no offense taken. I've been programming too long to sweat the small stuff.

One note:

You must always take into consideration that the id of the first record may not be 1, and that there may be deletions. Not all scenarios offer table id entries which are auto-incremented values in pure, strict sequential order.

Posted to Random Rows From MySQL over 1 year ago

Full table dataset from start to finish? I don't think so. I'm using 'LIMIT 1' on the first two. On the last one, I'm checking to see if one id exists.

However, you may be right in saying I'm over thinking it. I like your idea of pulling it all into an array and using shuffle(). On the other hand, having a large amount of data (e.g 1,000,000 rows) in a PHP array is memory intensive. The point here is, as I've stated, "... when dealing with large datasets." I've built large arrays in PHP, and it's not pretty. Sooner or later, your buffer fills up.

Think about it before posting a semi-ignorant and somewhat rude comment.

Posted to Parsing Large XML Files Using PHP over 1 year ago

True. However, note one of the comments on the settimelimit() page - "You can do settimelimit(0); so that the script will run forever - however this is not recommended and your web server might catch you out with an imposed HTTP timeout (usually around 5 minutes)."

Achievements
329 Karma
38,745 Total ProTip Views