Tema: Python+MySQL
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/02/2013, 15:20
coeth
 
Fecha de Ingreso: febrero-2013
Mensajes: 7
Antigüedad: 11 años, 3 meses
Puntos: 0
Respuesta: Python+MySQL

Cita:
Iniciado por razpeitia Ver Mensaje
Código Python:
Ver original
  1. cursor.execute("select nombre from productos where nombre like %s", ["%" + my_var + "%"])

Con esto debe de funcionar.

Obviamente sustituye my_var con tu variable.


funciono a la perfección gracias rezpeitia, justo lo que necesitaba, saludos!!