I need to take all of the default settings out of the settings table as well as, if applicable, the character setting for x characters.
However, this search only returns settings where character equals 1, not the default settings if no one has been set by the user.
SELECT `settings`.*, `character_settings`.`value`
LEFT JOIN `character_settings`
ON `character_settings`.`setting_id` = `settings`.`id`
WHERE `character_settings`.`character_id` = '1'
I need something like this:
'0' => array('somekey' => 'keyname', 'value' => 'thevalue'),
'1' => array('somekey2' => 'keyname2'),
'2' => array('somekey3' => 'keyname3')
Whereas key 0 contains the default value with the character value, keys 1 and 2 are the default values. Can someone please help me with this?