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 " | " Quote 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'].''); ?> Quote 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". Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.