<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Vorrei acquisire l'IP ma...]]></title><description><![CDATA[<p dir="auto">Chiedo aiuto per una parte di codice che non riesco a gestire come vorrei. La prima parte lavora correttamente e, il valore del campo viene correttamente acquisito.</p>
<p dir="auto">$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS["x_IP"]) : $GLOBALS["x_IP"];<br />
$theValue = ($theValue != "") ? " '" . $theValue . "'" : "NULL";<br />
$fieldList["<code>IP</code>"] = $theValue;</p>
<p dir="auto">Quello che vorrei fare è semplicemente acquisire l'indirizzo della macchina remota che accede al database. Il codice sottostante pero' mi provoca un errore....</p>
<p dir="auto">$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS["x_IP"]) : $GLOBALS["x_IP"];<br />
$theValue = ($theValue != "") ? " '" . $theValue . "'" :$_SERVER["REMOTE_ADDR"];<br />
$fieldList["<code>IP</code>"] = $theValue;</p>
<p dir="auto">.... ed ecco cosa mi compare a monitor:</p>
<p dir="auto">Failed to execute query at line 809: Errore di sintassi nella query SQL vicino a '.81.101 WHERE <code>protocolloID</code> = 20' linea 1<br />
SQL: UPDATE <code>proto</code> SET <code>A_P</code> = 'A', <code>data_protocollo</code> = '2006-12-07', <code>num_documento</code> = '345', <code>data_documento</code> = '2001-12-05', <code>mittenteID</code> = 6, <code>destinatarioID</code> = NULL, <code>note_destinatario</code> = NULL,<br />
<code>utenteID</code> = 3, <code>argomento</code> = 'INVIO N.D.', <code>estensione</code> = NULL, <code>note</code> = NULL, <code>check</code> = '\"', <code>IP</code> = 10.28.81.101 WHERE <code>protocolloID</code> = 20.</p>
<p dir="auto">Leggendo bene mi sembra di capire che il valore del campo IP, e cioe' 10.28.81.101, non è virgolettato come i campi precedenti.</p>
<p dir="auto">In poca sostanza tutti i campi vengono acquisiti fuorchè quello riferito all'IP. come posso fare affinchè anche il valore dell'IP sia anch'esso tra virgolette ??</p>
]]></description><link>https://dev.connect.gt/topic/22923/vorrei-acquisire-l-ip-ma</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 11:08:42 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/22923.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Dec 2006 21:39:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Vorrei acquisire l'IP ma... on Sun, 10 Dec 2006 09:39:19 GMT]]></title><description><![CDATA[<p dir="auto">Metti l'IP tra singoli apici nella query</p>
]]></description><link>https://dev.connect.gt/post/406853</link><guid isPermaLink="true">https://dev.connect.gt/post/406853</guid><dc:creator><![CDATA[pater]]></dc:creator><pubDate>Sun, 10 Dec 2006 09:39:19 GMT</pubDate></item></channel></rss>