on 2014 Apr 28 4:59 AM
In most databases (MSSSQL, Postgre, MySql, etc...) I can use prepared statements with labels instead of "?" question marks. It's even possible to bind more than one parameter without respecting the order of parameters. Example using PHP's PDO:
$dbh = new PDO(' ** connection dsn ** ');
$stmt = $dbh->prepare('SELECT * FROM products WHERE product_status = :statusid AND product_code = :productcode');
$stmt->execute(array(
':productcode' => 'ABCDEF',
':statusid' => 123,
));
Is there a way to obtain the same behaviour also on SQLAnywhere functions? It would be more confortable using parameters labels instead of question marks '?'.
If you are more comfortable using PDO to access data, you could try the SQL Anywhere PDO Driver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The input/output parameters are bound using the sqlany_bind_param method. Statements are executed using the sqlany_execute method. The actual parameters should be sent as host variables separate from the statement.
User | Count |
---|---|
71 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.