List:General Discussion« Previous MessageNext Message »
From:PJ Date:February 26 2009 6:19pm
Subject:Re: catch the error
View as plain text  
Jim Lyons wrote:
> what's the error message?
it's in the script/// Error performing query: of Error performing 1st
query: - whatever I input.
But I had an error in the include location... that's fixed and it works,
but not the rest as corrected:
<?
//include ("../lib/db1.php");    // Connect to database

$db_host = 'biggie';
$db_user = 'root';
$db_pass = 'gugus@#$';
$db_name = 'biblane';

$db_connect = mysql_connect($db_host, $db_user, $db_pass);
$db_select = mysql_select_db($db_name, $db_connect);

$sql1 = "INSERT INTO test (name, age) VALUES ('Arnie Shwartz', '75')";
$result1 = mysql_query($sql1,$db);
if (!$result1) {
  echo("<P>Error performing 1st query: " .
       mysql_error() . "</P>");
  exit();
}
?>

>
> On Thu, Feb 26, 2009 at 11:46 AM, PJ <af.gourmet@stripped
> <mailto:af.gourmet@stripped>> wrote:
>
>     It is commented out because I am using "mysql_connect...."
>     I don't think it would be good to use both, since the db1 references
>     another db. But even when I use the db1.php and change the
>     database and
>     table, I get the same error message.
>
>
>
>
> -- 
> Jim Lyons
> Web developer / Database administrator
> http://www.weblyons.com


-- 

Phil Jourdan --- pj@stripped
http://www.ptahhotep.com
http://www.chiccantine.com
Thread
catch the errorPJ26 Feb
  • Re: catch the errorDarryle Steplight26 Feb
    • Re: catch the errorPJ26 Feb
      • Re: catch the errorJim Lyons26 Feb
        • Re: catch the errorPJ26 Feb
      • Re: catch the errorDarryle Steplight26 Feb
        • Re: catch the errorPJ26 Feb
  • Re: catch the errorRicardo Dias Marques26 Feb
    • Re: catch the errorPJ26 Feb
      • Re: catch the errorDarryle Steplight26 Feb
  • RE: catch the errorJerry Schwartz26 Feb
    • Re: catch the errorPJ26 Feb
  • Re: catch the error [OFF TOPIC]Claudio Nanni26 Feb