use "web.db.query " for  a "select" sql will not return a NULL, can you 
give the err mesage and you table struct,
need more detail.

On Wednesday, November 6, 2013 5:55:10 PM UTC+8, you yang wrote:
>
> I'm using web.db.query to select from MySQL DB.
> But, when the result is None, the this function will output the stderr msg:
> """
> 0.0 (1): select * from `notify` where `end_time`=0 and  
> ((`start_time`+`alert_seconds`) < unix_timestamp());
> """
>
> and my function is:
> """
>     self.db = web.database(dbn='mysql', host='myhost.internal', port=3306, 
> user='db_user11', passwd='*******', db='DBDB')
>     def get_unfinish_notify(self):
>         try:
>             res = self.db.query("select * from `notify` where `end_time`=0 
> and  ((`start_time`+`alert_seconds`) < unix_timestamp());")
>         except:
>             res = False
>         return res
> """
> -
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to