Gracias

sql = """select * from hospital_resgitro where id_usuario='42004790' limit
1"""

eso me da el resultado, solo se selecciona el ultimo registro ingresado

Gracias.

2012/4/30 mauricio rodriguez <rodriguez.maurici...@gmail.com>

> Puedes o bien indicar el campo especifico en el resultado o bien pedir
> solo el campo en el query.
>
> La última opción es la mejor por cuestiones de rendimiento.
>
> sql = """select *campo *from hospital_resgitro where id_usuario='42004790
> '"""
>
> o bien
>
> cursor.execute(sql)
> for elemento in cursor.fetchall():
>     print elemento*[numerodecampo]*
>
> 2012/4/30 fabio rojas <fabioroj...@gmail.com>
>
>>
>>>
>>
>> select * from hospital_resgitro where id_usuario='42004790 limit 1
>>
>>
>>
>> _______________________________________________
>> Python-es mailing list
>> Python-es@python.org
>> http://mail.python.org/mailman/listinfo/python-es
>> FAQ: http://python-es-faq.wikidot.com/
>>
>>
>
> _______________________________________________
> Python-es mailing list
> Python-es@python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>


-- 
 *Diego Alonso Uribe Gamez*
------------------------------

*Desarrollador web*

Twitter: @DiegoUG <http://www.twitter.com/DiegoUG>

Google+: http://gplus.to/diegoug
------------------------------
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a