Hello!
I have on my computer the Sybase SQL Anywhere database. I need to connect to it using PHP-script. To do it I used an article from <!-- m --><a class="postlink" href="http://php.weblogs.com/odbc">http://php.weblogs.com/odbc</a><!-- m --> . For more insurance I loaded ASA requestor. But when I run it I got nothing, only my info strings about succesful connecting and query performing. My PHP-script:
<?
if ($connect = odbc_connect("pds", "dba", "sql")) {
print("Connected!\n");
};
$query = "SELECT ID_R, VP, VF FROM DV_DAY WHERE CODE=3";
$result = odbc_exec($connect, $query);
if (!$result) {
print("Query isn''t executed\n");
} else {
print("Query is executed!\n");
while(odbc_fetch_row($result)){
$IDR = odbc_result($result, "ID_R");
$VP = odbc_result($result, "VP");
$VF = odbc_result($result, "VF");
print("ID_R:$IDR, VP:$VP, VF:$VF\n");
}
}
odbc_close($connect);
?>
Only what I get in my browser are strings "Connected!" and "Query is executed!". Suggest me please why don't I see any others from my table? The table has more than 10000 records.
Thanks in advance,
Nicolay V.
I have on my computer the Sybase SQL Anywhere database. I need to connect to it using PHP-script. To do it I used an article from <!-- m --><a class="postlink" href="http://php.weblogs.com/odbc">http://php.weblogs.com/odbc</a><!-- m --> . For more insurance I loaded ASA requestor. But when I run it I got nothing, only my info strings about succesful connecting and query performing. My PHP-script:
<?
if ($connect = odbc_connect("pds", "dba", "sql")) {
print("Connected!\n");
};
$query = "SELECT ID_R, VP, VF FROM DV_DAY WHERE CODE=3";
$result = odbc_exec($connect, $query);
if (!$result) {
print("Query isn''t executed\n");
} else {
print("Query is executed!\n");
while(odbc_fetch_row($result)){
$IDR = odbc_result($result, "ID_R");
$VP = odbc_result($result, "VP");
$VF = odbc_result($result, "VF");
print("ID_R:$IDR, VP:$VP, VF:$VF\n");
}
}
odbc_close($connect);
?>
Only what I get in my browser are strings "Connected!" and "Query is executed!". Suggest me please why don't I see any others from my table? The table has more than 10000 records.
Thanks in advance,
Nicolay V.