Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies




9:58 pm on Jun 9, 2005 (gmt 0)

10+ Year Member


How can I get REMOTE_ADDR in the MySQL-command? - Google couldn't help me :(

mysql> SELECT * FROM [Table] WHERE Ipaddress = 'REMOTE_ADDR-command';



5:42 am on Jun 10, 2005 (gmt 0)

10+ Year Member

...or how can I get REMOTE_ADDR in the httpd.conf-file?
I want to use MySQL in http.conf.



12:08 am on Jun 13, 2005 (gmt 0)

10+ Year Member

MySql uses SQL, which is a querying language, thus can't store variables. You are going to need something to 'get' the IP of the user, and use whatever you used (I'll say you'll be using PHP) to query your database with the information gathered.

for example in PHP:


then your SQL query:

SELECT * FROM [Table] WHERE Ipaddress = '$ip';

If I understand you right, you are trying to do something that is beyond plain Structured Query Language.

-- Zak


Featured Threads

Hot Threads This Week

Hot Threads This Month