- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hey doods. How should one go about creating rotating ads on a site using php/mysql? Just for clarity, I’m talking a random ad on load, not like.. some javascript that will change the ad while the user is on the page…
@TT_MARK why would you never SELECT * ? If i need every single piece of data from a row, then I would SELECT *
@TT_MARK straight from dev.mysql.com
A select list consisting only of a single unqualified * can be used as shorthand to select all columns from all tables:
SELECT * FROM t1 INNER JOIN t2 ...
@TT_MARK I understand that you dont ALWAYS want to select everything, but your statement was that you should NEVER select everything. I was (and am) disagreeing with that. I have plenty of times where I need to get all columns out to either display or cache as a session variable.
@TT_Mark In fact “ORDER BY RAND” is very slow if performance counts.
Here is a post on it: http://akinas.com/pages/en/blog/mysql_random_row/