Linux-Noob Forums
Script to update mysql - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html)
+--- Forum: LAMP (https://www.linux-noob.com/forums/forum-83.html)
+--- Thread: Script to update mysql (/thread-945.html)



Script to update mysql - alc_hot_dog - 2008-05-20


Hi, i'm a portuguese Linux user.

 

I need help to create a script to update my database, this script is to be launched daily on cron.

 

The query is: (update accountinfo set Entreprise="OLICAR" where TAG="admin_reg" or TAG="agro";)

 

The table accountinfo is in database "test". I use mysql-server 5.0.32 in fedora 8.

I have already searched, but I only found script's in PHP.

 

I really appreciate your answer, thank you for your help.

 

Sorry my English.

 

Cheers.

Andr




Script to update mysql - hijinks - 2008-05-21


Code:
$ mysql -u Username -pPassword test -e 'update accountinfo set Entreprise="OLICAR" where TAG="admin_reg" or TAG="agro"'