Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2010, 02:12 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I haven't use OUTFILE with Windows, only with Linux.

But in Windows, shouldn't the path use \ and *NOT* / ???

f:\result.xls

And of course you will have to give the right permissions to f:

And, finally, I don't see how that creates an ".xls" file. That will just create a text file, not a proper CSV file, won't it??
 
Old September 22nd, 2010, 10:27 PM
Authorized User
 
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Old Pedant, I am not fimiliar with it, any best solution you had, in order make downloaded to EXCEL format. Tried will all technique, remain failed
 
Old September 23rd, 2010, 02:00 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, a CSV file normally has the format
Code:
"id","product","quantity"
73,"basket",17
33,"wheel",2
So clearly you could write your SQL SELECT to produce that. Tedious, but possible.

Personally, I'd use PHP or ASP or even VB to read the data and convert it to CSV, but that's up to you.
 
Old September 23rd, 2010, 06:03 PM
Authorized User
 
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok thanks, how should I code it it, want to try and convert it to EXCEL, i do need to produce in EXCEL format.

Regards.
 
Old September 23rd, 2010, 08:32 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

You can't produce Excel format easily. The best compromise is to produce ".csv" format (which I showed in post #13), which Excel *can* read.
 
Old September 23rd, 2010, 09:23 PM
Authorized User
 
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ermm..thanks for the solution, do we have other alternative instead of using temporary table in Mysql 4.01 as your example shown before...

Anyway I do thanks a lot for your helping and advice, may god bless.





Similar Threads
Thread Thread Starter Forum Replies Last Post
SELECT subqueries Wenggo MySQL 5 September 15th, 2010 09:27 PM
SubQueries debbiecoates SQL Server 2000 5 October 22nd, 2007 02:04 PM
SubQueries in a select statement in dataset madhusrp Reporting Services 1 February 22nd, 2007 03:03 AM
Multiple subqueries? thf1977 MySQL 1 October 24th, 2006 05:30 PM
subqueries mgdts SQL Server DTS 0 July 28th, 2003 01:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.