Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!not-for-mail From: "M. Strobel" Newsgroups: comp.lang.php Subject: Re: pgsql and exception Date: Mon, 14 May 2012 14:56:51 +0200 Lines: 23 Message-ID: References: <4fb0a891$0$1739$426a34cc@news.free.fr> <4fb0f971$0$21929$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de Y3nVuqMIdKjULzeJf5N8WgH8HIQ94g4JWOs+cdmYEkO2tmWFmO3jUFMnebgo5a/0I= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 In-Reply-To: <4fb0f971$0$21929$426a74cc@news.free.fr> Xref: csiph.com comp.lang.php:6027 Am 14.05.2012 14:24, schrieb Une B=C3=A9vue: > On 14/05/12 09:45, "=C3=81lvaro G. Vicario" wrote: >> This isn't a database error, it's a PHP error. The line where you defi= ne >> $ret's current value: >> >> $ret=3D$db->query($sql); >> >> ... failed. Such function should return a object but it didn't >> (probably, because it returned FALSE instead). >> >> =C2=ABReturn Values: A query result resource on success or FALSE on fa= ilure.=C2=BB >=20 > right, however the PHP error is due to an SQL one : > i was attempting to put a string of length > 30 in a column of type "va= rchar(30)". how about substr()? /Str.