Reply to Re: on error

Your name:

Reply:


Posted by Darko on 05/18/07 16:17

On May 18, 5:14 pm, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
> Robertu wrote:
> > Hi alt all
>
> Hi Robertu,
>
> > $connection = mysql_connect("12.34.5.67.89", "Sql111111","hELLOWORLD");
>
> mysql_connect returns a value.
> Check atwww.php.netfor details.
>
> In this case FALSE is returned if the mysql_connect fails.
> So you'll end up with something like this:
> $connection = @mysql_connect("12.34.5.67.89", "Sql111111","hELLOWORLD");
> if ($connection === FALSE){
> echo "problem connecting...";
> exit;
>
> }
>
> 2 notes:
> - The @ supresses a possible errormessage.
> - the === is NOT a typo.
>
> > mysql_select_db("11111111_1")
>
> Also, checkwww.php.netfor returnvalues.
>
> > $query = "SELECT from where...............
>
> This will probably not produce an error since you only construct the string.
> But when you execute it you can get an error.
> Also, check the returnvalue here too.
>
> Good luck!
>
> Regards,
> Erwin Moller
>
> > in any of these 3 steeps it can make error or any visitor can try to call
> > a different database or make irs own query
> > what can I do To be sure that on error in any of these 3 seep the PHP code
> > self call a certain page?
> > Thank you in advance and regards

Nothing to add :)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация