|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
could you write an article on your rating script one day
![]()
__________________
Apache Expert Last edited by asp_man : April 12th, 2002 at 06:28 AM. |
|
#2
|
|||
|
|||
|
yeah, i'd like to see that too. i'm working on a article script right now and it would be good to implement that into it.
__________________
![]() ![]() "Only Linux users see the end of crashes." - Pl4t0 |
|
#3
|
|||
|
|||
|
hey guys,
yeah sure thing. it's actually really to implement. makes use of cookies AND ip checking... one table with article id and vote... the i use a query like thsi to get the rating $query = "select * from ratings where articleId = xxx"; then... $result = mysql_query($query); $row = mysql_fetch_row($result); $num = mysql_num_rows($result); $avgVote = 0; if($num > 0) $avgVote = $row[0] / $num; else $avgVote = 0; then you can just check if there's at least three votes then display them...just so u dont get idiots rating articles 1/10... but yeah either me or tim or joe or annette will write an article on it soon...annette's getting into php and she's shown me some of her stufff...not bad at all. |
|
#4
|
|||
|
|||
|
ah i stuffed that up but u get the idea haha BAH!
|
|
#5
|
|||
|
|||
|
i guess the rating form just inserts into that table and then your query averages it out and prints it?
|
|
#6
|
|||
|
|||
|
cool i can't wait, cause it looks neat
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Just A Suggestion.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|