Write the statements which are used to connect php, C/C++ Programming

Assignment Help:

Write the statements which are used to connect PHP with MySQL?

Statements which can be used to connect PHP with MySQL is:

$conn = mysql_connect('localhost');

echo $conn;

?>

This statement gets the resource of localhost. There are other different ways with which you can connect to database and they are as follows:

mysql_connect('db.domain.com:33306','root','user');

mysql_connect('localhost:/tmp/mysql.sock');

mysql_connect('localhost','rasmus','foobar',

true,MYSQL_CLIENT_SSL|MYSQL_CLIENT_COMPRESS);

?>

 


Related Discussions:- Write the statements which are used to connect php

Functions and stack frame, Each function has its own stack frame between %f...

Each function has its own stack frame between %fp and %sp. Let Caller calls Callee. Then Caller's %sp becomes callee's %fp, and callee's %sp set to be a new value (a smaller one be

Random card generator, i need a program that generates this output: The hig...

i need a program that generates this output: The highest card wins! Suit Order is: clubs, diamonds, hearts and spades The computers card is the 5 of Spades. The player’s card is t

Explain increment and decrement operators, Increment and Decrement Operator...

Increment and Decrement Operators.   The operator for increment is '++' and decrement is '-'. These operators enhances or decrease the value of a variable on which they are ope

Advanced features of c, We are now quite happy to use the basic mathematica...

We are now quite happy to use the basic mathematical expressions, however in engineering we use scientific functions i.e Sin , Cos  , ln etc . Within C we have the following functi

Check whether the string entered is a palindrome or not, Program is to chec...

Program is to check whether the string entered is a palindrome or not: Program is to check whether the string entered is a palindrome or not invoke function from main int p

Change to palindrome, A palindrome is a string that reads the same from bot...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

I need online game dvelopment, Project Description: Online game developm...

Project Description: Online game development Online Live Baccarat Game is needed - client program. - server program(IOCP or ect..). - web program(ASP or PHP or etc..

I want youtube down-upload boots, Project Description: Boots capture vid...

Project Description: Boots capture video from your YouTube channel and upload your own video to our channel or the copyright of the videos, bang, 3 parties, automatically delete

Exceptions handling in cpp, Exceptions. Your SVector class should throw fou...

Exceptions. Your SVector class should throw four exceptions: 3.1. If the constructor size is invalid, then it will just allow the implicit STL bad_alloc exception to pass up to mai

How do i change an integer to a string?, A: The simplest way is to use a st...

A: The simplest way is to use a stringstream: #include #include #include using namespace std; string itos(int i) // convert int to string { stringstream s;

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd