For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2004 > How to select records if any of it's fields match the requirement?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to select records if any of it's fields match the requirement?
Amanda

2004-05-21, 10:30 pm

I would like to select the records where any of the fields LIKE '%abc%'

Can I do that without knowing the table's column names?



If table column names are required, how can I retrieve the column names from
the table?



Regards

Amanda


Justin Patrin

2004-05-21, 11:30 pm

Amanda wrote:
> I would like to select the records where any of the fields LIKE '%abc%'
>
> Can I do that without knowing the table's column names?
>
>
>
> If table column names are required, how can I retrieve the column names from
> the table?
>
>
>
> Regards
>
> Amanda
>
>


Many database engines will give them to you if you do this:

DESCRIBE table;

--
paperCrane <Justin Patrin>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com