"MySQL" Please respond to the following:

label Computer Science
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

Contrast the return value of the mysql_error() function and the mysql_errno() function. Provide an example of a scenario or situation of when each function would be used.

Oct 18th, 2017

MYSQL_ERROR

mysql_error is used in order to return "Error" message from the previous mysql operation

example

$servername = "localhost"

$username = "root"

$password = ""

// Create connection

$connection = mysql_connect( $servername , $username , $password ) or die ( mysql_error );

//============================================================================


MYSQL_ERRNO

mysql_errno return numerical value of "Error" Message from the previous mysql operation

example

// Create Connection

$connection = mysql_connect( $servername , $username , $password );


if ( mysql_errno($connection) )

echo " Success conected";

else

echo " Fail to connect ;


Mar 1st, 2015

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Oct 18th, 2017
...
Oct 18th, 2017
Oct 18th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer