Page 1 of 1

[solved] Formatting output this way !! HOW ???

Posted: Mon Dec 22, 2003 6:50 am
by igoy
This is a scenario .......

I have a MySQL table with two fields, which basically stores field_name & field_value.

it is basically a kind of history of previously used values in a perticular form. This table is used to re-use these values while filling out form.

The table structure is like this

Code: Select all

-----------------------------------------------
Table Name : fld_data
-----------------------------------------------

   field_name      |   field_value
--------------------|--------------------------
   name              |   Johny Bravo
   name              |   Freddy Dead
   name              |   Jack Ripper
   age                 |  15 yrs
   age                 |  35 yrs
   location           |  india
   location           |  england
   location           |  Mars
   age                 |  50
-----------------------------------------------
Now name, age and location are form fields. User has facility to store whatever data he is entering in form to this perticular table (fld_data), and insert any previously used valued from DB, so that there is no need to type same values everytime.

Now what I want to do is creating a page where user can edit / delete, values in this table.

I am stuck on how can I output the form that can edit this data, that is
I want to create a list of field_name.

something like this, say currently I have name, age, location in my table. so the list will be
name
age
location
not like this...
name
name
name
age
age
location
location
location
age

so the million dollar question is How?.
Can anyone please guide me how can I achieve this ?

[Solved]

Posted: Mon Dec 22, 2003 8:43 am
by igoy
I'm such a Bumhead....
such a basic thing and I wasted my precious 20 min writing this post.

How the Hell I forgot to use GROUP BY in SQL query....

:)

Well, it's solved.. and I'm ashmed as hell for being such a ignorant jerk.

Posted: Mon Dec 22, 2003 3:23 pm
by qads
want me to call you names etc? free of charge! :twisted:

Posted: Tue Dec 23, 2003 3:16 am
by igoy
Lol... why you ***** ?

Thanks Quad, but I guess I'm already enough ashamed for posting this question.... so thanks for names.

Posted: Tue Dec 23, 2003 3:17 am
by JayBird
igoy wrote:Thanks Quad...
Haha, it's not only me then that puts a 'U' in your name the Qads :)

Mark

Posted: Tue Dec 23, 2003 3:56 am
by Nay
Bech100 wrote:
igoy wrote:Thanks Quad...
Haha, it's not only me then that puts a 'U' in your name the Qads :)

Mark
It's called calling names Mark. Now BeUch100!

-Nay

Posted: Tue Dec 23, 2003 5:28 am
by igoy
Lol, It might have something to do with Quake... you see I play lot of Quake and Love playing with "Quad Damage", quake guys will know what is "Quad Damage".

so QADS, sorry about "U".

Posted: Tue Dec 23, 2003 5:44 am
by Nay
so QADS, sorry about "U".
Yeah, I feel sorry for him too :lol:

-Nay

Posted: Tue Dec 23, 2003 1:43 pm
by qads
lol :lol:

i am gona msg jason and have "quads" listed as a bad word and have it replaced by "qads" :twisted:

Posted: Tue Dec 23, 2003 2:04 pm
by d3ad1ysp0rk
or just replace "qads" with "quads" ? :lol:

Posted: Tue Dec 23, 2003 2:37 pm
by qads
sent the msg, lets see what happens :P