Ok my first post, and here is the problem.
I'm writing a PHP front end to an existing MSSQL DB, the designer of the DB has used spaces in just about every field name posable.. for example
User ID
First Names
Last Registration Type
When I do a query and try and pull objects with mssql_fetch_object I run into problems because of course the following is illegal in PHP.
$obj = mssql_fetch_object($query_id);
echo $obj->User ID;
echo $obj->First Names; // SPACES !!!
Vardump returns things like this.
object(stdClass)#8 (1) { ["computed"]=> string(10) "User ID" }
So my question, is it possible to have the field names translated to replace spaces with underscores, given that no _'s exist in the MSSQL DB at all.
Or another solution, I suppose I could just pull the results as an array but would rather not have to rewrite to much code.
Thanks