Hello all, First let me start by saying I've finally cleared time to play with zope. Its coming along nicely but I've hit a snag. The following snippet in a form: <TR><TD ALIGN="RIGHT">Staff</TD><TD><SELECT NAME="bugs_tbl.staff"> <!--#in qryListStaff --> <OPTION VALUE="<!--#var user_id-->"><!--#var user_name--> <!--#/in--> </SELECT></TD></TR> using MySQL produces the following HTML: <TR><TD ALIGN="RIGHT">Staff</TD><TD><SELECT NAME="bugs_tbl.staff"> <OPTION VALUE="2L">Alan Johnston <OPTION VALUE="1L">Tom Jenkins </SELECT></TD></TR> Now unfortunately I believe the L is causing the insert to fail with an invalid integer. I specified user_id as integer unsigned zerofill auto_increment. Does anyone know why the 'L' is being return? TIA -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tom Jenkins DevIS (http://www.devis.com) Linux & Samba 2.0 : The best Windows file server http://www.zdnet.com/sr/stories/issue/0,4537,2196106,00.html "Do not be overcome by evil, but overcome evil with good." Romans 12:21
At 06:14 14-3-99 , Tom Jenkins wrote:
Now unfortunately I believe the L is causing the insert to fail with an invalid integer. I specified user_id as integer unsigned zerofill auto_increment. Does anyone know why the 'L' is being return?
The L value is caused by a long integer to string conversion. You can get rid of the L by specifying a C format string, like so: <!--#var user_id fmt="%u"--> Martijn Pieters -- M.J. Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
At 06:14 14-3-99 , Tom Jenkins wrote:
Now unfortunately I believe the L is causing the insert to fail with an invalid integer. I specified user_id as integer unsigned zerofill auto_increment. Does anyone know why the 'L' is being return?
The L value is caused by a long integer to string conversion. You can get rid of the L by specifying a C format string, like so:
<!--#var user_id fmt="%u"-->
thanks guys that was exactly the problem and the above fixed it. I didn't know about the fmt capability. Anthony: <!--#var user_id fmt="%d"--> works too. Thanks again, -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tom Jenkins DevIS (http://www.devis.com) Linux & Samba 2.0 : The best Windows file server http://www.zdnet.com/sr/stories/issue/0,4537,2196106,00.html "Do not be overcome by evil, but overcome evil with good." Romans 12:21
participants (2)
-
Martijn Pieters -
Tom Jenkins