|
Attempting to perform a simple select using a PHP and db2_prepared statements. Running the query directly works fine (first part of code). When I run the db2_execute($stmt, $params), I get an error saying "Statement Execute Failed" with a SQL Error Code of 22023. Can anyone see what I'm doing wrong here?
PHP Code Below
<?php
$conn = db2_connect($database, $username, $password, $options);
$sql = "SELECT count(*) FROM CUSTOMERS WHERE acctnbr = ". $_REQUEST['accountNumber'];
$stmt = db2_exec($conn, $sql);
while ($row = db2_fetch_array($stmt)) {
print "$row[0]\n";
}
print "THIS WORKS <hr />";
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.