Monkuar Posted February 6, 2012 Share Posted February 6, 2012 $DB->query('UPDATE clans set pending_ids=pending_ids+"'.$ibforums->member['id'].'|" WHERE id = '.$this->clan['id'].''); I have a field called pending_ids and each time a new user requests to join a clan, i need it to add "memberid|" so then I can explode the member id's with the | later.. this query doesn't work it doesn't read the " | " Link to comment https://forums.phpfreaks.com/topic/256504-need-to-add-a-for-every-new-query/ Share on other sites More sharing options...
digibucc Posted February 6, 2012 Share Posted February 6, 2012 just do it beforehand <?php $id = $ibforums->member['id']. '|'; $DB->query('UPDATE clans set pending_ids=pending_ids+"'. $id WHERE id = '.$this->clan['id'].''); ?> Link to comment https://forums.phpfreaks.com/topic/256504-need-to-add-a-for-every-new-query/#findComment-1314951 Share on other sites More sharing options...
trq Posted February 6, 2012 Share Posted February 6, 2012 This is a terrible way of storing your data in the first place. You should look into "database normalisation". Link to comment https://forums.phpfreaks.com/topic/256504-need-to-add-a-for-every-new-query/#findComment-1315056 Share on other sites More sharing options...
silkfire Posted February 6, 2012 Share Posted February 6, 2012 What thorpe is trying to say is you should create a separate table for all pending ids and then have a column there cross reference to the clan_id in your clans table. Link to comment https://forums.phpfreaks.com/topic/256504-need-to-add-a-for-every-new-query/#findComment-1315057 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.