Jump to content

Add to table item


TEENFRONT

Recommended Posts

Hey

 

Im wanting to "ADD" something to a table row.. like, edit it...

 

Usually, id use UPDATE users SET nickname='$nickname - $team' WHERE usermail='$useremail'

 

But..in this case, it involves doing another query previous to the one above to get what $nickname is (i get $usermail from the submitted form, same as $team)... basically..i want to just add to the nickname field... So something like

 

UPDATE users SET nickname=' - $team' WHERE usermail='$useremail'

 

So its just adding the $team item to the nickname field... saving one query doesn't sound alot but i have over 270,000 users so saving every query where possible if crucial.

 

So yeah, it there a way to append (i think thats the word lol) database values?

Link to comment
https://forums.phpfreaks.com/topic/132084-add-to-table-item/
Share on other sites

No $team is just text and is set elsewhere from a drop down... basically, you get to choose your team, then it adds the team name into your nickname which is then shown around the site, this is why im wanting to updating nickname and append team to it. i know i could have nickname and team in different columns and just echo $nickname - $team... but..i cannot change what is echoed i can just eacho $nickname , so this is why i need to add the team value to nickname.. lol weeeeeeeeeeee.

Link to comment
https://forums.phpfreaks.com/topic/132084-add-to-table-item/#findComment-686419
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.