I have this code, the connection always works well, but when executing odbc_exec() its always give me a "error" for all sql commands.I am connecting with DBA privileges. In my php page i always get a warning "Warning: odbc_exec()" but no reason is specified.
$c = odbc_connect(service_name, user, password);
if (!$c)echo 'Failed to connect';
$sql= "SELECT * FROM Medics";
$result = odbc_exec($c,$sql) or die("error");
Anyone knows what is happening here? Thank you.
Edited by: 977169 on 16/Dez/2012 11:02
Glad you solved it. It is very non-standard to have user tables owned by a privileged account.
I understand you have an existing application and may be committed to using ODBC. For new development I would generally recommend using PHP's OCI8 extension instead of ODBC.