Twister1004 Posted March 4, 2010 Share Posted March 4, 2010 Ok when I run this SQL, I'm trying to get data back. However when It grabs the second table, it just nulls all the info for the second table that is being combined. If anyone could help me I would be entirely grateful. SELECT `accounts`.`loggedin`, `characters`.`name` FROM `accounts` LEFT JOIN `characters` ON `accounts`.`id` = `characters`.`accountid` ORDER BY `characters`.`name` ASC; Link to comment https://forums.phpfreaks.com/topic/194076-sql-syntax-gives-null/ Share on other sites More sharing options...
fenway Posted March 4, 2010 Share Posted March 4, 2010 Not "all" of the info -- just the non-matching records. After all, you did say LEFT JOIN. Link to comment https://forums.phpfreaks.com/topic/194076-sql-syntax-gives-null/#findComment-1021453 Share on other sites More sharing options...
Twister1004 Posted March 4, 2010 Author Share Posted March 4, 2010 Wow I do feel like an idiot. There was a data mismatch.... Thank you very much Fenway. That was an error by me. Link to comment https://forums.phpfreaks.com/topic/194076-sql-syntax-gives-null/#findComment-1021625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.