everlifefree Posted March 17, 2008 Share Posted March 17, 2008 I just need a more experienced coder to verify my code is correct because I think I might have done some thing wrong because it won't show. if (isset($_GET["id"])) $row4 = myF(myQ(" SELECT * FROM `[x]vote` WHERE `mediaid` = '{$_GET["id"]}' ORDER BY `id` ASC LIMIT 20 ")); $tpl -> AssignArray(array( "vote.id" => $row4["id"], "vote.userid" => $row4["userid"], "vote.vote" => $row4["vote"], )); if (isset($row4["userid"])) $row5 = myF(myQ(" SELECT * FROM `[x]gallery` WHERE `id` = '$row4["userid"]' ORDER BY `id` ASC LIMIT 20 ")); $tpl -> AssignArray(array( "vote.username" => $row5["username"], "vote.mainpicture" => $row5["mainpicture"], )); $i=0; while ($Vote = myF($row5)) { $VotenewArray[] = array( "vote.username" => $Vote["username"], "vote.mainpicture" => $Vote["mainpicture"], ); $i++; } if (isset($VotenewArray)) $tpl->Loop("voting", $VotenewArray); Is there a problem with having the code like this above? WHERE `id` = '$row4["userid"]' Or is there a better way to do it? Quote Link to comment Share on other sites More sharing options...
everlifefree Posted March 17, 2008 Author Share Posted March 17, 2008 Anyone Quote Link to comment Share on other sites More sharing options...
lemmin Posted March 17, 2008 Share Posted March 17, 2008 Yep. Try this: if (isset($row4["userid"])) $row5 = myF(myQ(" SELECT * FROM `[x]gallery` WHERE `id` = '" . $row4["userid"] . "' ORDER BY `id` ASC LIMIT 20 ")); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.