If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > A strange request

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-10, 12:51
Vaselinessa Vaselinessa is offline
Registered User
 
Join Date: Aug 2010
Posts: 2
A strange request

What I want to do is print out all the databases in mysql to a csv or excel file so that I can learn what's in them.

Why do I want that, and what makes this complicated? I'm keeping a wordpress blog at work, and I want to create a custom page that acts like a homepage for posts of a certain category page. (Yes, I know you can create a page with wordpress that shows all the posts under a given category, but I want something that shows the most recent post and looks like a decent user-oriented page.) Ergo, I want to learn how the wordpress sql database is set up so that I can extract the posts I need dynamically for the pseudo-home page in question.

I wasn't the one who set up the blog, and my boss is an awful bottleneck, so I'll never get the info I need from IT. Yes, it would make more sense to interact with the mysql database in some way other than writing a php script and running it, but I don't know how to access the database in any other way. I tried using an sql utility for creating a spreadsheet from the database, but I was unable to connect. (I don't know why I couldn't connect, but being outside of IT, I'm hardly surprised.)

Has anybody out there used a script that I can upload to the server, then run, to get a .csv or .xlsx?
Reply With Quote
  #2 (permalink)  
Old 08-10-10, 12:53
Vaselinessa Vaselinessa is offline
Registered User
 
Join Date: Aug 2010
Posts: 2
I doubt it makes any difference to anyone, but in case you were wondering what the purpose of this secondary home page is: I draw the webcomic Palsied Octogenarian Surgeon and host it on my work blog.

It's now on page 2 of Google's search results for "webcomics," so I think it's high time it had a decent home.
Reply With Quote
  #3 (permalink)  
Old 08-10-10, 15:10
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by Vaselinessa View Post
... so that I can learn what's in them.
why not just browse the data in the tables?


Quote:
Originally Posted by Vaselinessa View Post
Yes, it would make more sense to interact with the mysql database in some way other than writing a php script and running it, but I don't know how to access the database in any other way.
try HeidiSQL
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Tags
csv, excel, mysql, php, wordpress

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On