Jump to content

Proble with space in column name


NoPHPPhD

Recommended Posts

You can use underscores, which look visually similar to spaces.

[code=php:0]$fatm += ($row->fat_mono * $row->mgrams / 100);[/code]


And you can rename the columns from the query appropriately by selecting "`fat mono` AS fat_mono", if this is database results you are dealing with.  Or you can fetch the data as an array instead of an object.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.