Kameleon
10-18-2006, 06:00 PM
I can't believe how crap my sql skills have gotten. I can't remember anything. Please could someone help me with the syntax that finds all fields that contain data ONLY.
Like:
SELECT * from tablename WHERE (fielddata) NOT NULL;
...or something like that.
So if I had fields [artist - cd - year]
and record 1 was [artist=Blur - cd=NULL- year=NULL]
and record 2 was [artist=Fresh - cd=Hits - year=NULL ]
My result array should be:
ResultsArray0[
[artist]>Blur
]
ResultsArray1[
[artist]>Fresh
[cd]>Hits
]
So only creating an associative array with the fields that have data - ignoring blanks, not allowing them to enter the array. I'm using PHP by the way.
Help Please?
Thanks.
Like:
SELECT * from tablename WHERE (fielddata) NOT NULL;
...or something like that.
So if I had fields [artist - cd - year]
and record 1 was [artist=Blur - cd=NULL- year=NULL]
and record 2 was [artist=Fresh - cd=Hits - year=NULL ]
My result array should be:
ResultsArray0[
[artist]>Blur
]
ResultsArray1[
[artist]>Fresh
[cd]>Hits
]
So only creating an associative array with the fields that have data - ignoring blanks, not allowing them to enter the array. I'm using PHP by the way.
Help Please?
Thanks.