X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 01738D1B1AB for ; Sun, 11 Jul 2004 22:53:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57061-04 for ; Mon, 12 Jul 2004 01:53:49 +0000 (GMT) Received: from beta.interspire.com (unknown [210.215.130.98]) by svr1.postgresql.org (Postfix) with ESMTP id 22338D1B190 for ; Sun, 11 Jul 2004 22:53:44 -0300 (ADT) Received: from [192.168.0.13] (helo=chris) by beta.interspire.com with esmtp (Exim 3.35 #1 (Debian)) id 1BjplO-0004sl-00; Mon, 12 Jul 2004 11:37:50 +1000 From: "Chris" To: "'Elijah O. Alcantara'" , Subject: Re: wouldn't insert Date: Mon, 12 Jul 2004 11:53:43 +1000 Message-ID: <001901c467b3$10a3be70$0d00a8c0@chris> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <1089596732.11624.3.camel@Falcon> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/13 X-Sequence-Number: 2838 error_log won't email you will it? It'll put it into the apache error log (by default) or the file you specify in your php.ini file, or if you have it in your script, ini_set('log_error',......) And don't separate the query, just error_log it like error_log($query2); Chris. -----Original Message----- From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org] On Behalf Of Elijah O. Alcantara Sent: Monday, July 12, 2004 11:46 AM To: pgsql-php@postgresql.org Subject: Re: [PHP] wouldn't insert I tried using error_log() but never got any emails... error_log("This is query2 inserting $ctrl_no $category $contact_no $organization_name $address $telephone $fax $email", 1, "elijah@asti.dost.gov.ph"); looks like it never went in the for loop, somethings wrong... Thanks for the advice, Elijah On Sat, 2004-07-10 at 03:08, brew@theMode.com wrote: > Elijah..... > > > There are no errors whatsoever, must be something wrong with the > > logic somewhere... > > What I do when I can't find errors is break down the code into smaller > steps and add error checking. > > Make the connection and check the return value. > > Put together the sql statement and print it. > > Query the database and check the return value. > > and so forth..... > > Check php.net to see some examples of error checking. > > On another note, if I'm only working with only one db I just connect > once near the start of the script and then use that connection for the > subsequent calls. > > brew > > ======================================================================== == > Strange Brew (brew@theMode.com) > Check out my Musician's Online Database Exchange (The MODE Pages) > http://www.TheMode.com > ====================================================================== > ==== > > > ---------------------------(end of > broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html