Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How can I connect to my SQL server using PHP code

simsim Member Posts: 40
[b][red]This message was edited by the sim at 2002-7-7 23:54:22[/red][/b][hr]
Can anybody help me on how can I connect to my SQL server database using php code.Can you inspect why this code will not work upon retrieving data? I'm just new to php and I am practicing it right now.

php code ex:

$conn = pg_Connect("dbname=SQLSERVERDB port=80");
if(!$conn) { echo "Error in connecting to DB
"; exit; }
$result = pg_Exec($conn, "SELECT * FROM table1 WHERE surname '$NAME' ");

Thanks for the help.....



Comments

  • gigsvoogigsvoo Member Posts: 328
    : [b][red]This message was edited by the sim at 2002-7-7 23:54:22[/red][/b][hr]
    : Can anybody help me on how can I connect to my SQL server database using php code.Can you inspect why this code will not work upon retrieving data? I'm just new to php and I am practicing it right now.
    :
    : php code ex:
    :
    : $conn = pg_Connect("dbname=SQLSERVERDB port=80");
    : if(!$conn) { echo "Error in connecting to DB
    "; exit; }
    : $result = pg_Exec($conn, "SELECT * FROM table1 WHERE surname '$NAME' ");
    :
    : Thanks for the help.....
    :
    :
    :
    :

    I am not familiar with PHP, perhaps posting ur question to PHP forum will help, do you want me to move ur message over there?

    Neo Gigs
    http://communities.msn.com.my/VisualBasicwithNeo

  • Justin BibJustin Bib USAMember Posts: 0

    | http://forcoder.org | free ebooks and video tutorials about \ Visual Basic .NET, Ruby, Java, MATLAB, C++, PL/SQL, Python, Go, Delphi, PHP, JavaScript, Scratch, C#, C, Objective-C, Perl, R, Visual Basic, Assembly, Swift Kotlin, COBOL, F#, D, Ada, Rust, Bash, Alice, Hack, LabVIEW, Dart, Scheme, Awk, Crystal, ABAP, Fortran, Lua, Transact-SQL, Lisp, SAS, Julia, Erlang, Apex, ML, Scala, VBScript, Logo, FoxPro, Prolog, Clojure \ ___

Sign In or Register to comment.