|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Question?
Nice artical but I have a question. There is a table in this tutorial called "links". Is there supposed to be a column in the table called "cssclass"?
Your coding seems to make reference to it several times. The links are suppose to be displayed in all caps if they are new (up to 14 days old) but they dont seem to. Why? Also, sorry for the question, I'm a newbie "php programmer". PHP Code:
Also found reference in this part of the code: PHP Code:
cssclass Thanks Sean Karns |
|
#2
|
||||
|
||||
|
I'm not sure which article you're referring to... but I think I can answer your question...
The answer's in the SQL query (slightly re-written for clarity reasons): $strsql="SELECT description, url, target, IF(whenadded > (SUBDATE(CURDATE(), INTERVAL '14' DAY)), 'new', 'info') as cssclass FROM links ORDER BY cssclass, UCASE(description)"; The SELECT statement is providing a nickname for the entire field, and calling it cssclass... An easier example could be: SELECT my_dob AS date FROM person The field would return named date, instaed of my_dob Its a way to alias columns/information. In the future, its best to post the question in the Article Discussion forum specifically, and/or at least point out which article you're talking about =) |
|
#3
|
|||
|
|||
|
Thank you for you help!
Thanks for the help. Sorry about posting in wrong area I had to sign up for the forum before I could post and somehow thought it took me back to the proper (forum/tutorial) thread. Here is the artical called (as the link says) Building a sustainable web site. http://www.devarticles.com/c/a/MySQ...nable-Web-Site/
Again Thanks so much Sean Karns Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Question? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|