need a help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gpong
Forum Newbie
Posts: 16
Joined: Sun Aug 06, 2006 8:49 am

need a help

Post by gpong »

Everah | Please edit your post title to reflect the nature of your question.

i have a problem with my mysql. if I have 5 tables and each table have 10 columns, and in each table, I want to get the first column name. what should I do?? thank you
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

gpong
Forum Newbie
Posts: 16
Joined: Sun Aug 06, 2006 8:49 am

hi

Post by gpong »

show columns comand its show all field but I need only the first field name. have any idea??[s]thx[/s] thanks [s]u[/s] you
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: hi

Post by superdezign »

gpong wrote:show columns comand its show all field but I need only the first field name. have any idea??thx u
Only fetch the first piece of data, or put a LIMIT on it (if it's possible).
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: hi

Post by RobertGonzalez »

gpong wrote:show columns comand its show all field but I need only the first field name.
So get the first column name. If your data was returned in an array, perhaps you could get the first member of the resultant array.
Post Reply