question about using sql server with php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sudhakar

    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($se lectquery);

    mysql_close($co nn);
    }


    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
  • Curtis

    #2
    Re: question about using sql server with php

    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($se lectquery);
    >
    mysql_close($co nn);
    }
    >
    >
    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.v endors.php>
    <URL:http://php.net/manual/en/book.pdo.php>

    --
    Curtis
    $eMail = str_replace('si g.invalid', 'gmail.com', $from);

    Comment

    • Jerry Stuckle

      #3
      Re: question about using sql server with php

      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($se lectquery);
      >
      mysql_close($co nn);
      }
      >
      >
      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.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      Working...