antonyfal Posted May 8, 2013 Share Posted May 8, 2013 Hi Im new to "join" function this is my first attempt.. My example below only outputs the first tab/row. I need all the data output.. the "rel" below seems correct to the one tab loaded.. if(isset($_GET['loadLists'])) { if($needAuth == 1 && !is_logged()) return 'you must be logged in to view this list.'; $current_user_id = (__isset('multiuser') == 1)?intval($_SESSION['userid']):0; $q = $db->dq("SELECT * FROM todo_lists INNER JOIN todo_lists_setting ON todo_lists.id=todo_lists_setting.list_id WHERE todo_lists_setting.user_id = '$current_user_id'"); while($row = $q->fetch_assoc($q)) // same as mysql_fetch_assoc { echo '<li id="list_'.$row['id'].'" rel="'.$row['notify'].'_'.$row['showcompl'].'_'.$row['sorting'].'_'.$row['shownotes'].'_'.$row['showdates'].'" class="ytt-tabi"><a href="#list/'.$row['id'].'" rel="'.$row['id'].'" title="'.htmlarray($row['name']).'"><span>'.htmlarray($row['name']).'</span></a></li>'; } } Quote Link to comment https://forums.phpfreaks.com/topic/277790-php-mysql-join-outputs-only-one-row/ Share on other sites More sharing options...
antonyfal Posted May 8, 2013 Author Share Posted May 8, 2013 anybody?? Quote Link to comment https://forums.phpfreaks.com/topic/277790-php-mysql-join-outputs-only-one-row/#findComment-1429079 Share on other sites More sharing options...
Jessica Posted May 8, 2013 Share Posted May 8, 2013 You already have a thread for this topic. Please go read our rules. Quote Link to comment https://forums.phpfreaks.com/topic/277790-php-mysql-join-outputs-only-one-row/#findComment-1429092 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.