|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Member
Join Date: Oct 2005
Posts: 7
|
Messy looking database tables
I have started to populate a database table with some recipes, but for some reason the tables 'look' very messy when you for example do a 'select * from table'
The information is formatted fine when displayed on the browser, but for some reason it just seems wrong to have such a messy layout in the db, especially when there's going to be hundreds of rows. I have attached a screen shot of what it looks like. Any tips to tidying up my db most appreciated Mike |
|
|
|
|
|
#2 |
|
SQL Consultant
![]() ![]() ![]() Join Date: Jul 2002
Location: Toronto, Canada
Posts: 31,026
|
please show us the results of SHOW CREATE TABLE tablename
|
|
|
|
|
|
#3 |
|
reads the Community Crier
![]() ![]() ![]() ![]() Join Date: Feb 2004
Location: Tampa, FL (US)
Posts: 9,896
|
it's "messy" simply because you have so many columns and console windows don't scroll horizontally. try using \G instead of ;
|
|
|
|
|
|
#4 |
|
SitePoint Member
Join Date: Oct 2005
Posts: 7
|
attached is a screen shot of the 'show create table recipes'
cheers |
|
|
|
|
|
#5 |
|
SitePoint Member
Join Date: Oct 2005
Posts: 7
|
hello again
i dont suppose anyone could look at the last screenshot i made of the show create table syntax? is there really no way to make a table with lots of columns and text smart and formatted, like an html table would be? |
|
|
|
|
|
#6 |
|
reads the Community Crier
![]() ![]() ![]() ![]() Join Date: Feb 2004
Location: Tampa, FL (US)
Posts: 9,896
|
yes, use PHP to put it in an html table. the mysql client is not designed for pretty output. it's designed for administration and development.
|
|
|
|
|
|
#7 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: May 2005
Posts: 418
|
Newbie creates database, but...
.. where are those tables that mysql created? How do I edit them? I want to put the text below the pic, but I can't find the table code that corresponds in any of the php files. Did I do this wrong?
http://www.lavernechristopher.us/lav...tings_view.php |
|
|
|
|
|
#8 |
|
SQL Consultant
![]() ![]() ![]() Join Date: Jul 2002
Location: Toronto, Canada
Posts: 31,026
|
SHOW TABLES FROM mysql
SHOW TABLES FROM yourdatabase |
|
|
|
|
|
#9 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: May 2005
Posts: 418
|
Originally Posted by longneck
use PHP to put it in an html table. the mysql client is not designed for pretty output. it's designed for administration and development. I'M READING THROUGH THE FORUMS TO FIND OUT HOW TO DO THIS. SHOW ME? I need to separate the two fields somehow. Pic above, text below. http://www.lavernechristopher.us/la...ntings_view.php |
|
|
|
|
|
#10 |
|
SQL Consultant
![]() ![]() ![]() Join Date: Jul 2002
Location: Toronto, Canada
Posts: 31,026
|
then you'll want the php forum, no?
![]() i'll move this thread for you |
|
|
|
|
|
#11 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: May 2005
Posts: 418
|
Are you sure?
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 18:40.














Linear Mode
