php/sybase newbie
| From: | Lancelot Hack | Date: | Fri, 03 Jan 2003 17:05:56 +0000 |
| Subject: | php/sybase newbie | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24515@lists.php.net to get a copy of this message | ||
<html>
<body>
<?
phpinfo();
$user_data=sybase_connect("SYBASE","sa","sapass");
if ($user_logins=sybase_select_db("user_logins",$user_data)) {
if ($query=sybase_query("select * from user_logins",$user_logins)) {
if ($sybobj=sybase_fetch_object($query)) {
echo $sybobj.username;
echo $sybobj.password;
} else echo "Object err";
} else echo "Query err";
} else echo "Select err";
sybase_close();
?>
</body>
</html>
i m a newbie to php and sybase
i know the thing above is quite foolish as i know some calls will do the
connect stuff
but i just write by logic and the results was "Select err" on the homepage
i m quite stuck with the msg and i dun even know if i handle the calls in
correct steps
pls correct me for any errors in the code
bg info:
sybase is up and running with the db user_logins with 1 row inside it
thx a lot