<br><br>
<div class="gmail_quote">On Jan 16, 2008 6:00 PM, Iñaki Baz Castillo &lt;<a href="mailto:ibc@in.ilimit.es">ibc@in.ilimit.es</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">On Wednesday 16 January 2008 17:49:49 David Villasmil wrote:<br><br>&gt; quiero obtener el balance de un cliente a partir del $ua, así:<br>&gt;<br>&gt; modparam(&quot;avpops&quot;,&quot;avp_url&quot;,&quot;
mysql://user:pass@1.2.3.4/dbname&quot;)<br>&gt; modparam(&quot;avpops&quot;, &quot;avp_table&quot;, &quot;clients&quot;)<br>&gt; if ($(au{s.len})&gt;0){<br>&gt; &nbsp; &nbsp; &nbsp;avp_db_query(&quot;select balance from clients where number =
<br>&gt; &#39;$au&#39;;&quot;,&quot;$avp(i:10001)&quot;);<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;xlog(&quot;L_NOTICE&quot;, &quot;\select balance from dbname.clients where number =<br>&gt; &#39;$au&#39;;\n&quot;);<br>&gt; &nbsp; &nbsp; &nbsp;xlog(&quot;L_NOTICE&quot;, &quot;\nMYSQL Query executed\nResults: $avp(i:10001)\n&quot;);
<br>&gt; }<br>&gt;<br>&gt; pero siempre da valores NULL, aparentemente se conecta y todo, pero...<br><br></div>Habilita el log de MySQL:<br><br>&nbsp;/etc/mysql/my.cnf:<br>&nbsp; &nbsp;# Be aware that this log type is a performance killer.
<br>&nbsp; &nbsp;log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = /var/log/mysql.log<br><br>Y haz un &quot;tail -f &nbsp;/var/log/mysql.log&quot; a ver qué consulta te está haciendo en<br>realidad. Luego copia y pega esa misma consulta en una sesión mysql a ver si<br>
da resultado o no.<br><font color="#888888"><br><br><br><br>--<br></font>
<div>
<div></div>
<div class="Wj3C7c">Iñaki Baz Castillo<br><a href="mailto:ibc@in.ilimit.es">ibc@in.ilimit.es</a><br><br>_______________________________________________<br>Users-es mailing list<br><a href="mailto:Users-es@lists.openser.org">
Users-es@lists.openser.org</a><br><a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users-es" target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users-es</a><br></div></div></blockquote></div>
<div><br>&nbsp;</div>
<div>el comando:</div>
<div>&nbsp;</div>
<div>
<div>select balance,&nbsp;DATE_FORMAT(now(),&#39;%a, %e %b %Y %H:%i:%s EST&#39;)&nbsp;from clients where number = &#39;XXXXXX&#39;</div></div>
<div>Está bien, Hace el query correcto... he agregado fecha y me da esto:</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Results: &lt;null&gt; - Wed, 16 Jan 2008 12:16:36 EST</div>
<div>...</div>
<div>&nbsp;</div>
<div>Gracias por tu ayuda</div>
<div>saludos</div>