Solved

How does a Website connect to the database.

Posted on 2012-04-11
4
358 Views
Last Modified: 2012-04-11
Hello:
My company has a website hosted in iPage.com, built with WordPress implementation.
That site connects to the company's SQL server in Chicago.

I would like to know HOW DO THE TWO COMMUINCATE?

Thanks you.
0
Comment
Question by:noamco36
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 250 total points
ID: 37834575
Wordpress is written in PHP. PHP has function calls that allow you to connect to any database server that accepts remote connections and you have the ability to login to.
0
 

Author Comment

by:noamco36
ID: 37834626
can you give an example of PHP connection code to SQL server?

I dont know PHP language, but I want to be able to identify the connection code if I will take a look at the WordPress site code.
0
 

Author Comment

by:noamco36
ID: 37834647
Please see attached and explain.
connection.docx
0
 
LVL 1

Accepted Solution

by:
chrisroch earned 250 total points
ID: 37836169
PHP has many database related functions that are used for:
Managing Database connections
Manipulating database structure
Manipulating the data
among others...

The number of functions increase as there are different functions for different database implementations, however the simplest means of initiating a connection to a mysql database server is displayed in the code below:

$connection = mysql_connect("server_in_chicago","user","password");

Open in new window


If the above call is successful, there are other function calls that will have be used to extract data from the database.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question