Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
Bigboy177
Worker
Worker



Joined: Jul 07, 2004
Posts: 192

PostPosted: Sat Aug 07, 2004 10:45 am Reply with quote

1. How to read total number of items from the table...
For example: I've got many Pages in Encyclopedia... And I would like to read and display how many...

2. I've got a table field called VOTES... how can I add votes to it... I mean if in this field the number is 1, when somebody votes I want it to increase the number to 2... Then after the next vote... the number should increase to 3... and so on...

3. And one more question... How can I round the numbers... I would like to have a score displayed... but it will be an avarage score of many users' votes... and I don't want to see: Score: 7.789237649236459 but Score: 7.7 or 7.8...

I think that's all... Smile
Thanks for help... Wink
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Aug 07, 2004 11:01 am Reply with quote

My advice is that you get a good book on PHP and MySQL. I highly recommend PHP and MySQL Web Development (Second Edition) by Luke Welling and Laura Thomson. Another great source is [ Only registered users can see links on this board! Get registered or login! ] Study the Encyclopedia module and the Survey module to see how those queries are constructed Wink
 
View user's profile Send private message
Bigboy177







PostPosted: Sat Aug 07, 2004 11:07 am Reply with quote

I know I have to buy a book... because I really started liking PHP and MySQL... But I will not buy it today... Can you please help with the questions above... Please... I'm sinishing my module... but without these three answears I won't, at least not until I buy a book...

Please help... Wink
 
Bigboy177







PostPosted: Sat Aug 07, 2004 11:38 am Reply with quote

Please just help me with the last question... I've figured out the first two... But I can't do the last one... Please... Wink
 
Raven







PostPosted: Sat Aug 07, 2004 11:40 am Reply with quote

[ Only registered users can see links on this board! Get registered or login! ]
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©