0

how i can use mysql_error() function if i use php with sql server(mssql) or oracle ?

2
  • lol _ oky tell me any function can make same job Commented Apr 9, 2011 at 6:29
  • 1
    You shouldn't be using the antiquated mysql or mssql extensions in any case. It's been twice supplanted. At this point, you should be using PDO. For SQL Server, there's the SqlSrv PDO driver. Also, be careful you don't display DB errors to anyone but an administrator, else you'll be disclosing too much information. Commented Apr 9, 2011 at 7:18

1 Answer 1

3

You can not use mysql_error with myssql or oracle databases.

they have their own

mssql_get_last_message for mssql.

oci_error for oracle.

Sign up to request clarification or add additional context in comments.

3 Comments

oky and what about mysql_real_escape_string is there any function do same jop with oracle and sql server? and i ask about, mysql_insert_id()
@user646645: The easy way to find the function is to go with PHP manual php.net/manual/en/book.mssql.php you can find here all the functions of databases
i know but i cant find function like mysql_escap_real_string and mysql_insert_id for sql server and oracle

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.