[FX.php List] Spaces in field names

Joel Shapiro jsfmp at earthlink.net
Wed Oct 22 11:36:40 MDT 2008


Hey Jonathan

I'm also working on a project with an existing database that uses  
spaces in field and TO names.  (It  also uses ~ and @ characters (!?)  
and I'm actually surprised at how well they're all holding up through  
the PHP.)  I haven't had to change a single name.

I'm using str_replace() to replace the underscores in GET variables  
with the spaces in the field names, such as:
str_replace('_', ' ', $_GET['value'])

HTH,
-Joel

~~~~~~~~~~~~~~~~~~~~~~~
Joel Shapiro
FileMaker Pro
database & web design
http://www.jsfmp.com
415-269-5055
~~~~~~~~~~~~~~~~~~~~~~~



On Oct 22, 2008, at 8:44 AM, Jonathan Schwartz wrote:

> Hi Folks,
>
> What are the options if a db has spaces in filed names?
>
> When I create the db, I always omit them. But, I'm about to start a  
> project with an existing db that does contain spaces in field names.
>
> Using Debug, I note that the query properly translates spaces to  
> the "%20" character.  However, the sort part of the query seems to  
> translate the space to an underline...breaking the query. (This  
> might be a function of how I wrote the query code. I'm not sure).
>
> It *is* possible for me to rid the field names of spaces.  I was  
> wondering what other options exist.
>
> Thx.
>
> jonathan
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list