Re: Getting only the column names
Date: Sat, 30 Jul 2016 09:04:28 +0100
Message-ID: <nnhn2b$4ua$1_at_news.albasani.net>
On 30/07/16 08:55, bit-naughty_at_hotmail.com wrote:
> On Saturday, July 30, 2016 at 7:55:04 AM UTC+5:30, Gordon Burditt
> wrote:
>>
>> Also, using the PHP function mysql_fetch_assoc, it will put the
>> column names as the keys in an array. You are free to use these
>> names and ignore the associated data.
>
>
> Sorry - I'm getting a little confused - what associated data? What
> will the SELECT query be? Could I ask you to post some code to
> illustrate what you mean? :) (yes, I'll be using PHP, btw! :) )
>
a table consists of rows of name:value pairs. The name is the field name, the value is the associated data. mysql_fetch_assoc() returns an array of key=>value pairs. Its possible to read the keys (the name) and junk the value (the 'associated data').
-- "I guess a rattlesnake ain't risponsible fer bein' a rattlesnake, but ah puts mah heel on um jess the same if'n I catches him around mah chillun".Received on Sat Jul 30 2016 - 10:04:28 CEST