Mysql redirect query to file
In the login. So on successful login I do this. Here's this in a few steps:. On the login page, you either modify the form action to include the query string, or set the query string in the session. If the login is successful, you either read the query string from the checkout page, or you read it from the session and redirect the user accordingly. But the idea is the same: see what they ask for, save them in the login process and redirect accordingly. If there are multiple parameters that are fixed don't change , it's a really good option to put them on the form as a hidden field and submit them to the login process page.
Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page. View all page feedback. In this article. Redirection is only possible with SSL. Disadvantage : None of the output fields are quoted. Run mysqldump to directly write the data to a file.
Again, I included an additional command to get the column headers at that top of the output file. Advantage : Simplified method to get quoting around output fields.
Disadvantages : All output fields are quoted. Adding column headers requires an extra command and the use of a temp file. I ended up going with Method One, wrapping up the multiple mysql invocations in a Bash script. Since the file was destined to be opened in a Spreadsheet, and the optional quoting makes the import process nice and easy. The third method is somewhat wrong.
Both method 1 and method 3 are essentially the same thing.
0コメント