Jump to content

hello i need your help for a sql commqnd


eric258

Recommended Posts

i ve never used mysql this is what i would like to do

 

on the picture there is a column tm_country HUN and  an other named tm_extension at the present there is a gif representing the country hungary flag, now there are 5000 rows with HUN and i have a hard time copying and pasting the gif into each single row

 

would you please help me with a query that would paste hassal-132.gif in each row whose contry is HUN (hungary)

 

 

the name of the table as shown on the picture is ebo_sb_teams

 

 

 

 

thank you for your help

Link to comment
Share on other sites

Don't do that.

 

Have a "flag" table which contains records with code and image name for each country. Job done.

|  tm_country   |    image_name    |
+---------------+------------------+
|     HUN       |   hassal-132.gif |

When you query the first table, JOIN to the flag table using the country code

Link to comment
Share on other sites

because normally i am suppose to enter a flag for every single player coming from lets say hungary but when i enter it from the back end of my site; the file changes name.... so i ve noticed that by pasting the same name on all the field i achieve the same results that is why i need a sql commande that would paste it for me and i have never seen sql commande

Link to comment
Share on other sites

for instance one hungarian player his flag could be  hassal-45.gif and an other one could be hassal-458.gif if i enter by the normal procedure but i ve noticed by pasting one hungarian flag on other hungarian row the result is the same

Link to comment
Share on other sites

it display hungarian flag on all the players so that is why i need the sql thing

 

i ve never used sql i am not a programmer i just need a query

 

 

barand could you help me with the sql file?

 

 

UPDATE ebo_sb_teams

SET tm_extension='hassal-132.gif'

WHERE tm_country='HUN';

 

 

would this kinda line do the trick?

Edited by Ch0cu3r
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.