| List: | General Discussion | « Previous MessageNext Message » | |
| From: | PJ | Date: | February 26 2009 5:28pm |
| Subject: | catch the error | ||
| View as plain text | |||
What is wrond with this file? same identical insert works from console
but not from this file :-(
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?
//include ("lib/db1.php"); // Connect to database
mysql_connect('biggie', 'user', 'password', 'test');
$sql1 = "INSERT INTO example (name, age) VALUES ('Joe Blow', '69')";
$result1 = mysql_query($sql1,$db);
if (!$result1) {
echo("<P>Error performing 1st query: " .
mysql_error() . "</P>");
exit();
}
?>
</body>
</html>
Seems to be good to print out the error message, but that's all. db not
written.
--
Phil Jourdan --- pj@stripped
http://www.ptahhotep.com
http://www.chiccantine.com
| Thread | ||
|---|---|---|
| • catch the error | PJ | 26 Feb |
| • Re: catch the error | Darryle Steplight | 26 Feb |
| • Re: catch the error | PJ | 26 Feb |
| • Re: catch the error | Jim Lyons | 26 Feb |
| • Re: catch the error | PJ | 26 Feb |
| • Re: catch the error | Darryle Steplight | 26 Feb |
| • Re: catch the error | PJ | 26 Feb |
| • Re: catch the error | Ricardo Dias Marques | 26 Feb |
| • Re: catch the error | PJ | 26 Feb |
| • Re: catch the error | Darryle Steplight | 26 Feb |
| • RE: catch the error | Jerry Schwartz | 26 Feb |
| • Re: catch the error | PJ | 26 Feb |
| • Re: catch the error [OFF TOPIC] | Claudio Nanni | 26 Feb |
