By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,747 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,747 IT Pros & Developers. It's quick & easy.

question about using sql server with php

P: n/a
i have a question about how to use sql database with php instead of
using my sql database

when i use my sql database the php code to connect to the my sql
database is =

$conn = mysql_connect($hostname, $user, $password);

if(!$conn)
{
echo "Unable to connect to Database";
}

else
{
mysql_select_db($database, $conn);

$query = mysql_query($selectquery);

mysql_close($conn);
}
if i have to connect to a sql databse instead of my sql database as
some companies use sql database, how can i change the php code to
connect, run a query and close connection

to the sql database.

apart from changing the code to connect to sql database is there
something else i need to do.

php my admin is used to access the tables in mysql database, which
tool should be used to access data in the tables for sql database.

please advice.

thanks
Oct 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sudhakar wrote:
i have a question about how to use sql database with php instead of
using my sql database

when i use my sql database the php code to connect to the my sql
database is =

$conn = mysql_connect($hostname, $user, $password);

if(!$conn)
{
echo "Unable to connect to Database";
}

else
{
mysql_select_db($database, $conn);

$query = mysql_query($selectquery);

mysql_close($conn);
}
if i have to connect to a sql databse instead of my sql database as
some companies use sql database, how can i change the php code to
connect, run a query and close connection

to the sql database.

apart from changing the code to connect to sql database is there
something else i need to do.

php my admin is used to access the tables in mysql database, which
tool should be used to access data in the tables for sql database.

please advice.

thanks
<URL:http://www.google.com/>
<URL:http://php.net/manual/en/refs.database.vendors.php>
<URL:http://php.net/manual/en/book.pdo.php>

--
Curtis
$eMail = str_replace('sig.invalid', 'gmail.com', $from);
Oct 27 '08 #2

P: n/a
Sudhakar wrote:
i have a question about how to use sql database with php instead of
using my sql database

when i use my sql database the php code to connect to the my sql
database is =

$conn = mysql_connect($hostname, $user, $password);

if(!$conn)
{
echo "Unable to connect to Database";
}

else
{
mysql_select_db($database, $conn);

$query = mysql_query($selectquery);

mysql_close($conn);
}
if i have to connect to a sql databse instead of my sql database as
some companies use sql database, how can i change the php code to
connect, run a query and close connection

to the sql database.

apart from changing the code to connect to sql database is there
something else i need to do.

php my admin is used to access the tables in mysql database, which
tool should be used to access data in the tables for sql database.

please advice.

thanks
Which database? "MySQL" is a specific database. "SQL Database" is a
generic term; there are many, such as PostGres, SQL Server, Oracle, DB2,
and more. Each one is a little different.

You won't find any tools such as PhpMyAdmin for other databases, but
they have their own tools (so does MySQL, for that matter).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.