Martin Ramirez
unread,Jan 9, 2012, 12:15:28 PM1/9/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
hi
I'm new using sqlanywhere since last week i'm trying to install
sqlanywhere module and all is ok til i try to use with php like the
manual says:
From the command line on non-Windows platforms:
/opt/sqlanywhere12/bin32s/dbinit hits.db
/opt/sqlanywhere12/bin32s/dbsrv12 hits.db
and using the php code
<html>
<body>
<p>Record page hits</p>
<?php
$conn = sasql_connect("uid=dba;pwd=sql");
sasql_query($conn,
"CREATE TABLE IF NOT EXISTS hits (hit TIMESTAMP)");
sasql_query($conn,
"INSERT INTO hits VALUES(now(*))");
$result = sasql_query($conn,
"SELECT TOP 10 hit FROM hits ORDER BY hit DESC");
if ($result) {
echo "<table border='1'>\n";
while ($obj = sasql_fetch_object($result)) {
echo "<tr>\n";
echo "<td>$obj->hit</td>\n";
echo "</tr>\n";
}
sasql_free_result($result);
echo "</table>\n";
}
sasql_close($conn);
?>
</body></html>
but just show me record page hits
in localhost/info.php show me this
SQLAnywhere support enabled
Allow Persistent Connections Yes
Persistent Connections 0/unlimited
Total Connections 0/unlimited
PHP SQLAnywhere driver version 2.0.10.0
SQLAnywhere client version 12.0.1.3152
Directive Local Value Master Value
sqlanywhere.allow_persistent On On
sqlanywhere.auto_commit On On
sqlanywhere.max_connections Unlimited Unlimited
sqlanywhere.max_persistent_connections Unlimited Unlimited
sqlanywhere.verbose_errors On On
Can somebody help me?
Thanks