Page 1 of 1

need a help

Posted: Sun Aug 12, 2007 9:31 pm
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.

Posted: Sun Aug 12, 2007 11:14 pm
by RobertGonzalez

hi

Posted: Mon Aug 13, 2007 12:59 am
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.

Re: hi

Posted: Mon Aug 13, 2007 5:47 am
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).

Re: hi

Posted: Mon Aug 13, 2007 10:40 am
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.