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>'; } } 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?? 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. 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
Archived
This topic is now archived and is closed to further replies.