Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old December 18th, 2002, 01:25 AM
anguish anguish is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 anguish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Getting host!

I am trying to figure out how to get the host name/ip through a query. Well what it is, the place I have my database at has the php My Admin on it. What do I need to put in the query box in order to see the host name/ip address?

Reply With Quote
  #2  
Old December 18th, 2002, 07:49 AM
hermawan's Avatar
hermawan hermawan is offline
Superman is not dead
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Jakarta, Indonesia
Posts: 552 hermawan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 21 m 55 sec
Reputation Power: 2
Send a message via ICQ to hermawan Send a message via AIM to hermawan Send a message via Yahoo to hermawan Send a message via Google Talk to hermawan Send a message via Skype to hermawan
RE: Getting host!

1. Do you want to see the hostname of the server OR
2. The hostname of the user who will interact with DB ?.

If you just want to see the hostname of the server, then you should run a php script that display the IP of the server.

If what you mean is the 2nd, then you had to make a field to save the IP of user, then just select that field on the query box.

Reply With Quote
  #3  
Old December 18th, 2002, 08:05 PM
anguish anguish is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 anguish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Getting host!

Yes I want to see the hostname of the server. I need it for the mysql_connect(HOST...)

I did use show user(), and used the ip after the @, but it didn't work.

Reply With Quote
  #4  
Old December 20th, 2002, 07:59 AM
hermawan's Avatar
hermawan hermawan is offline
Superman is not dead
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Jakarta, Indonesia
Posts: 552 hermawan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 21 m 55 sec
Reputation Power: 2
Send a message via ICQ to hermawan Send a message via AIM to hermawan Send a message via Yahoo to hermawan Send a message via Google Talk to hermawan Send a message via Skype to hermawan
RE: Getting host!

Well, if mysql is in the same server with php then you can use localhost as the hostname of the machine.

mysql_connect("localhost", "username", "password");

If it's on different server then you might to ask your mysql administrator, coz the hostname is putted on the separate table, it's on the db: mysql, table: host.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Getting host!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway