Ever wonder what "default username" is?
<?php
$link = mysql_connect() or die(mysql_error());
$result = mysql_query("SELECT SESSION_USER(),
CURRENT_USER();");
$row = mysql_fetch_row($result);
echo "SESSION USER: ", $row[0],
"<br>\n";
echo "CURRENT USER: ", $row[1],
"<br>\n";
?>
Both are ODBC localhost in my win2k install, so my
advice for windows is:
- create a MySQL user named ODBC with no password
- add localhost to ODBC user [right-click ODBC]
- set schema previleges to ODBC localhost
- use mysql_connect() with no parms, or do not use ;)
This turns to work also with odbc_connect:
odbc_connect("myDSN", "",
"")
----
Server IP: 81.92.200.26
Probable Submitter: 213.22.112.233
----
X-Spam-Status: No, hits=3.1 required=5.0
tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
a>
Edit -- http://master.p
hp.net/note/edit/66893
Del: integrated -- ht
tp://master.php.net/note/delete/66893/integrated
Del: useless -- http:
//master.php.net/note/delete/66893/useless
Del: bad code -- http
://master.php.net/note/delete/66893/bad+code
Del: spam -- http://m
aster.php.net/note/delete/66893/spam
Del: non-english -- h
ttp://master.php.net/note/delete/66893/non-english
Del: in docs -- http:
//master.php.net/note/delete/66893/in+docs
Del: other reasons-- http://master
.php.net/note/delete/66893
Reject -- http://master
.php.net/note/reject/66893
Search -- http://ma
ster.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|