473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

question about using sql server with php

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
2 1469
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
2
by: Woody Splawn | last post by:
I have been using VB.net for stand alone and client/server kinds of things but am beginning to explore its use for web applications. I need to ask a couple of real basic questions. My...
7
by: News | last post by:
Hello, I have to build a program with the future in mind and I need a bit of guidance from a guru or two. My program will start as a multi-user Windows Application built with VB.Net and using an...
13
by: Woody Splawn | last post by:
If this is not the right newsgroup for this question please direct me. I have been using VB.net for stand alone and client/server kinds of things but am beginning to explore its use for web...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.