๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1342

Re: PHP+MYSQL local versus remoto

#1342
From: Cristian Gutierrez
Date: Sat, 30 Sep 2006 03:41
28 lines
2095 bytes
Este miercoles, gato2006chileSINESTO@gmail.com dijo:

[...]

> $consulta  = "insert into evaluacion (indice,analizado,descript,asig,perc,
> nogrupo,detalle,valor,afecta) values(".$valorins.",'".$analizado.
> "','".$descrip."','".$asig."','".$perc."','".$nogrupo.
> "','".$detalle."','".$valor."','".$afecta."')";
>
> El problema esta relacionado al valor indice($valorins) que es
> obtenido de una cookie de la operacion base
> $valorins=$_COOKIE['insertado'];
>
> ๏ฟฝTendra algun problema el servidor, porque si elimino el entero o si
> especifico un valor, el insert responde bien?.

Es infinitamente mas facil ver donde esta el problema si haces un dump
de las consultas SQL *armadas* al browser:

  printf("%s:<br/><pre>%s</pre>", "consulta", $consulta);

Tambien es buena idea echarle una mirada a mysql_error().

-- 
Guti
good: 		while (1) {fork;} 
better:		while(!fork()) { fork(); }
best:		for(fork();!fork();fork()) fork();
Technical Details
Message-ID: <871wpu9g1x.fsf@guti.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news.cec.uchile.cl!not-for-mail
References: <eff0is$oq$1@news.nivel5.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,10d7f5d8f732d1fc
X-Google-Thread: fad43,10d7f5d8f732d1fc
X-Google-Attributes: gid1593cb,gidfad43,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news.cec.uchile.cl!not-for-mail
From: Cristian Gutierrez <crgutier@dcc.uchile.cl>
Newsgroups: chile.comp.programacion,chile.comp.www
Subject: Re: PHP+MYSQL local versus remoto
Date: Fri, 29 Sep 2006 23:41:46 -0400
Organization: DCC/Uchile
Lines: 28
Message-ID: <871wpu9g1x.fsf@guti.cl>
References: <eff0is$oq$1@news.nivel5.cl>
NNTP-Posting-Host: vpn-client-028.cec.uchile.cl
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: localhost.localdomain 1159587710 1054 172.17.35.28 (30 Sep 2006 03:41:50 GMT)
X-Complaints-To: news@localhost.localdomain
NNTP-Posting-Date: Sat, 30 Sep 2006 03:41:50 +0000 (UTC)
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Cancel-Lock: sha1:UiALnCmTxQVVRp4nf/S6qBtj9Ok=