Hi all,
I could really use some help with some bash coding, and reading stuff from a database.
Lets say that the owner of the DB is named: root
His password is: 12345
The name of the MySql databaes it: somename
The server is: localhost
The quiry to create the database looks like this:
Code:
CREATE TABLE `name_users` (
`ID` int(10) NOT NULL auto_increment,
`user_name` varchar(50) default NULL,
`user_emailaddress` varchar(50) default NULL,
`user_info` varchar(50) default NULL,
UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
Now how do I read the database named 'somename', read the table 'named_users' and show only the results of 'user_name' and 'user_info' (like this)
Code:
frank some user info about frank here
peter some user info about peter here
steven some user info about steven here
This all needs to be dumped in a 'txt' file.
Anyone here who could give me some help / samples with this?
Recent comments
7 hours 25 min ago
16 hours 53 min ago
17 hours 42 min ago
21 hours 15 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 4 hours ago
1 day 14 hours ago
1 day 19 hours ago
1 day 20 hours ago