diff options
Diffstat (limited to 'dbinit/procedures.sql')
-rw-r--r-- | dbinit/procedures.sql | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dbinit/procedures.sql b/dbinit/procedures.sql index e69de29..b6b0042 100644 --- a/dbinit/procedures.sql +++ b/dbinit/procedures.sql @@ -0,0 +1,12 @@ +drop procedure if exists spUpdateFlags; + +delimiter $$ +create procedure spUpdateFlags(imgPath varchar(255)) + begin + update `nationality` as `A` + set `A`.`flag` = ( + select load_file(concat(imgPath, `country`, ".png")) as `flag` + from `nationality` as `B` + where `B`.`ID` = `A`.`ID`); + end$$ +delimiter ; |