Linux-Noob Forums

Full Version: Script to update mysql
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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


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