We had a Red Hat 9 server running php 5 and apache 2 that would open a table in a pervasive database that had non standard field names, for example "MTWORO_OP_TEMP".
The following sql executed properly on the red hat box:
$query = 'SELECT MTWORO_WOPRE,
MTWORO_WOSUF,
MTWORO_OP_TEMP,
MTWORO_CODE
FROM worout
WHERE MTWORO_OP_TEMP^ = $RouteTemplate[$RouteCount] and
not (MTWORO_CODE In ($AllRevisions))
ORDER BY mtworo_wopre, mtworo_wosuf ';
Unfortunately this box began having problems. We loaded everything on a SUSE 10 server running php 5 and apache 2 and we get the following syntax error:
Warning: %v%v() [function.%v]: SQL error: [unixODBC][Pervasive][Pervasive ODBC Client Interface][Pervasive][ODBC Engine Interface]Syntax Error: SELECT MTWORO_WOPRE, MTWORO_WOSUF, MTWORO_OP_TEMP<< ??? >>, MTWORO_CODE FROM worout WHERE MTWORO_OP_TEMP^ = $Ro, SQL state 37000 in SQLExecDirect in /srv/www/htdocs/Intranet/TemplateTimesForTopLevel.php on line 139
I do not think this has anything to do with Magic Quotes but I cannot figure out how to configure the new box to recognize the ^ as a legitimate character in the sql field name.
Thanks for your help!