I am using SQL Anywhere in php, i use something like this:
sasql_connect ("Uid=".$uid.";Pwd=".$password.";ServerName=".$servername.";CommLinks=tcpip(host=".$ip.";port=".$port.")");
$result = sasql_query("SELECT * FROM cars");
When i use:
while($row = sasql_fetch_array($result)) {
}
I get:
Warning: sasql_fetch_array(): 27 is not a valid SQLAnywhere result resource in ...
When i use:
echo get_resource_type($result);
I get 'SQLAnywhere result'
Also other functions like sasql_num_rows()
don't work, what could be a reason this doesn't work? It looks like the resource is not recognized. I am 100% sure there is no error in the SQL query.