This doesn't seem to work. I've tried with, without commas and lots of other things. Just can't seem to find an answer searching the net so am posting.
# user_id should be entered at command line as in $1
mysql -u root -p -D database << EOF
SELECT * FROM table1, table2, table3, table4 WHERE user_id = 8;
I need to do the following.
bash script one
-Output to a file, including the field names for each table with the records lined up below them.
-Read data inserted into multiple tables by the same user_id.
-Write spacer between each table output, such as 'Table1' so I can see where the tables start/end.
-In one table, read not all of the fields but only some
-A second script which allows me to specify the user_id but to delete all of the data shown in first script
I am looking for examples and solutions even better and can supply what ever missing info there is.