|
Posted by Kim Andrι Akerψ on 01/17/07 06:40
user wrote:
> Could someone give me the quick difference betweeen the 2 error
> functions and why one should use one or the other.
>
> if (!mysql_select_db($database, $connection))
> showerror();
>
> $connection = mysql_connect('mysql_host', 'mysql_user',
> mysql_password') or die('Could not connect: ' . mysql_error());
Since the PHP manual doesn't list a function named showerror(), I can
only guess that it's a user-created function (ie. created by whoever
wrote the script), while mysql_error() is a built-in function that
retrieves the last error message from MySQL (or a blank string if the
last query/access was successful).
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|