PEAK XOOPS - know if photo is already voted by user in englishin japanese

know if photo is already voted by user

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/20 18:46
slyss79  三等軍曹   Posts: 143
hi everyone

i need to know if user have already voted a photo (by the lid)

in viewcat.php i have insert this:

$uid = $xoopsUser->getVar('uid');
$sql = "SELECT ratingid ";
$sql.= " FROM ".$xoopsDB->prefix('myalbum3_votedata');
$sql.= " WHERE ratinguser = '$uid'";
$sql.= " AND lid = '$lid'";
$rs = $xoopsDB->query($sql) or die($xoopsDB->error());

if($xoopsDB->getRowsNum($rs)>0){
//voted
}else{
//not voted
}

but it dosn't work because $lid is not valid.... but if i open my viewcat.php?cid=4 the variable $lid is valid!!!!

can you help me to know in viewcat.php if (for ex.) photo.php?lid=19 if already voted by this user....

http://img301.imageshack.us/img301/4793/immagine1gt2.jpg
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/8/23 17:52
slyss79  三等軍曹   Posts: 143
i have solved it...

the thread for the solution is here

byee
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!