Hello again.
I´ll just like to say thanks for the nice work your doing and ask a question.
What If I like to show the votes on each item?
I don´t really know how to add the product_votes to the array and show it.
Please let me know if there is a easy way to get the amount of votes next to or under the item name.
Best regards
Wizzuriz
Rating System, Display Votes
Re: Very great tutorial
Which tutorial are you referring to ?
Also, can you explain what you mean a bit more ?
EDIT: Actually I think I know what you mean, you just need to add the number of votes tot he column list in the SELECT part of the query.
Also, can you explain what you mean a bit more ?
EDIT: Actually I think I know what you mean, you just need to add the number of votes tot he column list in the SELECT part of the query.
Re: Rating System, Display Votes
Hello Again.
This is the code from vore & rating system.
product.inc.php
Thanks for your quick replay.
Regards
Wizzuriz
This is the code from vore & rating system.
product.inc.php
function fetch_products(){ $sql = "SELECT `product_id`, `product_name` FROM `products` ORDER BY `product_votes` DESC"; $result = mysql_query($sql); $products = array(); $level = array(); while (($row = mysql_fetch_assoc($result)) !== false){ $products[$row['product_id']] = $row['product_name']; } return $products; }becomes =
function fetch_products(){ $sql = "SELECT `product_id`, `product_name`, `product_votes` FROM `products` ORDER BY `product_votes` DESC"; $result = mysql_query($sql); $products = array(); $level = array(); // how will I add it here in the array ? while (($row = mysql_fetch_assoc($result)) !== false){ $products[$row['product_id']] = $row['product_name']; } return $products; }how will I add it on the list.php when its in the array.
Thanks for your quick replay.
Regards
Wizzuriz
Re: Rating System, Display Votes
on list.php you will be able to do
echo $item['product_votes'];Which will the total number of votes that product has.
Re: Rating System, Display Votes
Thanks, I will try that.
Should I add it in the while loop? if then how?
// AND ['product_votes'] ?
I believe that many would like a online class, one where we could ask question and have hands on help. There could be a small fee for each class and we can vote each week on what to talk and work with.
Just a ideer.
Ones again thanks I will get back to you on how that vote item.
Regards
Wizzuriz
Should I add it in the while loop? if then how?
// AND ['product_votes'] ?
while (($row = mysql_fetch_assoc($result)) !== false){ $products[$row['product_id']] = $row['product_name'];A other question is, are you planing to make a online class room?
I believe that many would like a online class, one where we could ask question and have hands on help. There could be a small fee for each class and we can vote each week on what to talk and work with.
Just a ideer.
Ones again thanks I will get back to you on how that vote item.
Regards
Wizzuriz
Re: Rating System, Display Votes
Ah yeah you will need to do somethign likewizzuriz wrote:Should I add it in the while loop? if then how?
// AND ['product_votes'] ?
while (($row = mysql_fetch_assoc($result)) !== FALSE){ $products[$row['product_id']] = array( 'name' => $row['product_name'], 'votes' => $row['product_votes'], );
Possibly, YouTube partners can live stream on their channels so I might do that at some point not that soon. It would obviously be free.wizzuriz wrote:A other question is, are you planing to make a online class room?
I believe that many would like a online class, one where we could ask question and have hands on help. There could be a small fee for each class and we can vote each week on what to talk and work with.