Quoting Mazhar Bilen <[EMAIL PROTECTED]>:

> Use this variable:
>
> $REMOTE_ADDR.
>
> Such that:
>
> $client_IP = $REMOTE_ADDR;
> UPDATE clients SET ipaddr= $client_IP WHERE [EMAIL PROTECTED];

This doesn't appear to work: I don't think the MySQL server recognizes
$REMOTE_ADDR as anything meaningful.  Perhaps you're referring to the case in a
PHP or Perl script where $REMOTE_ADDR is meaningful, and this value is being
substituted into the string before the query is sent to MySQL?

Unfortunately that solution is not appliable to my problem.  I'm talking
directly from a remote NAT'ed client to an SQL server without any Perl/PHP
intermediary.  I need a way to identify the client's IP address from the bare
SQL server.

mysql> SELECT NOW() FROM nodes;
2004-09-30 11:27:53

mysql> SELECT $REMOTE_ADDR FROM nodes;
ERROR 1054 (42S22): Unknown column '$REMOTE_ADDR' in 'field list'

mysql> select "$REMOTE_ADDR" FROM nodes;
$REMOTE_ADDR

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to