adding data to mysql database ?
is it possible for bash to connect to a remote dbase and enter details from users inputs to it
the script i have that wish to add data to database is this Code:
#!/bin/bash so it would add the clan contact address and repayment date then if person was to end contract i have a scipt to remove the email reminder but would also like to connect to the dbase and remove details . thanks in advance |
Hmm.. I'm no guru, but I'm pretty sure you could cat into existence a file containing the required sql statements, and then pass the file to mysql using a command-line similar to:
Code:
mysql -uuser -ppassword db_name <sqlstatements.sql - Ebonhand |
rharris, I cant help but I just wanted to say, nice script :)
|
Quote:
Multiple echos instead of <<HERE documents, multiple hardcoded parameter strings. Hardcoded directory paths? It's one of those that develops into a hard to maintain megascipt ;) |
please remeber i am new to linux so still learning
billy is it poss to connect to a remote database not on server to enter the info gathered into it and then if client removes themselves from mailing i can delete database enteries ? thanks in advance |
sorry, i really wasn't trying to be rude ;)
remote database? Sure I should imagine so. Most databases are on remote machines when you connect. What sort of database? You need to look at the DBMS software documentation that should tell you how to do it. I can't remeber a lot as I haven't done much with databases for a while (praise the lord!) |
billy i wasnt being funny im just keen to learn and all help is greatly recieved
|
All times are GMT -5. The time now is 04:42 PM. |