DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st April 2009
cksraj cksraj is offline
Real Name: Crew Kasy Raj
Port Guard
 
Join Date: Mar 2009
Posts: 12
Thanked 0 Times in 0 Posts
Question PHP~MYSQL - Get list of all the fields within a table

Hi

I would like to get list of all the fields in a table. Is there any command available in MYSQL (Or) PHP.

Thanks
Jarrelva
Reply With Quote
  #2   (View Single Post)  
Old 21st April 2009
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,062
Thanked 198 Times in 156 Posts
Default

You mean something like:

Code:
# mysql
mysql> use database_name;
mysql> describe table_name;
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 22nd April 2009
cksraj cksraj is offline
Real Name: Crew Kasy Raj
Port Guard
 
Join Date: Mar 2009
Posts: 12
Thanked 0 Times in 0 Posts
Thumbs up Yes, but I need to get only fields

describe table_name; - gives all details about table like Field, Type, Null, Key, etc... I want to get only Field from the result set, that is Field Name from a table. Is there any command (OR) function available in mysql?

Last edited by cksraj; 22nd April 2009 at 07:43 AM.
Reply With Quote
Reply

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I think I just mangled my partition table Mantazz FreeBSD Installation and Upgrading 2 2nd July 2009 09:55 PM
List of users connected by sftp. amscotti OpenBSD General 7 1st April 2009 07:26 PM
table formatting (could not find better title) gosha Programming 10 19th March 2009 06:33 PM
How to get a list of volumes? PeterSteele Programming 12 17th July 2008 09:32 AM
Ajax dynamic table/spreadsheet robbak Programming 1 7th June 2008 10:33 PM


All times are GMT. The time now is 03:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick