Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-17-2003, 07:14 PM   #1 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Preformatted MySQL tables

If this makes any sense to anyone, I'm looking for a method of outputting MySQL queries that look like queries from the command line. Something like this:

+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | tinyint(4) | | PRI | NULL | auto_increment |
| name | varchar(40) | | | | |
| email | varchar(40) | | | | |
+-------+-------------+------+-----+---------+----------------+


Of course that looks messy, but it's copied / pasted directly from the MySQL prompt. There is a way of using <pre> and a mysql_query to output a page that looks just like that...I had it at one time, course, I've misplaced it...

bdl is offline   Reply With Quote
Old 02-17-2003, 07:59 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
can you give me an example with table and field names .. and somewhat exactly how you want it to print out?

i'm not sure if you want the actual field 'types' or the contents of the field.
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Views sde PHP 1 05-01-2003 12:06 PM
and on to mysql .. sde Linux / BSD / OS X 2 01-18-2003 07:39 PM
Word Wrap with Mysql type Text??? toe_cutter PHP 8 09-10-2002 12:25 PM


All times are GMT -8. The time now is 07:15 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting