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; Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/194076-sql-syntax-gives-null/#findComment-1021625 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.