![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2001
Location: Utopia
Posts: 392
|
php or mysql?
I have a mysql table filled with crap. I need to pull random lines from this table making sure that each time I query a line that is can not be queried again.
Which is better, doing it all as a mysql statement, or doing it inside of php? Either way I will have to figure out the method to do it, but maybe one of you php pros can point me in the right direction so I learn the right one first... ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Apr 2004
Posts: 2,225
|
Put a special flag in a field when you use it the first time
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
|
Done right, you should always opt for doing it in mysql when you can as oppoed to in php.
For example, you might be pulling all your rows into an array and then picking out a random one in php....It's much more effective to use Mysql's function RAND instead in your actual query.
__________________
Skype variuscr - Email varius AT gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
Quote:
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2001
Location: Utopia
Posts: 392
|
Thanks guys. My knowledge on the subject is a little thin so your advice will certainly help make my new tgp more productive!
|
![]() |
![]() ![]() ![]() ![]() ![]() |