[SR-Users] db_mysql errors
Daniel-Constantin Mierla
miconda at gmail.com
Mon Mar 2 08:55:46 CET 2015
Can you run with debug=3 in kamailio.cfg? You should see a log message
with the value of the date that is to be converted.
Cheers,
Daniel
On 26/02/15 11:35, jaflong jaflong wrote:
> This is the format of the column.
>
> 0000-00-00 00:00:00 is the data in the field. Could it be a bug where the value is 0000-00-00 00:00:00
>
>
> | Type | Null | Key | Default
> +----------------+---------------+------+-----+-----
> | datetime | NO | | 0000-00-00 00:00:00
>
>
>
> 26.02.2015, 11:47, "Daniel-Constantin Mierla" <miconda at gmail.com>:
>> It seems that the value in a datetime column cannot be converted -- can
>> you show the result of the same query in mysql client?
>>
>> Cheers,
>> Daniel
>>
>> On 26/02/15 00:45, jaflong jaflong wrote:
>>> I am getting errors when I run the following code
>>>
>>> if (sql_xquery("mydb", "select * from account where account = 'demo'", "res") == 1) {
>>> xlog("L_INFO", "my number: $xavp(res=>number)\n");
>>> } else {
>>> xlog("L_WARN", "Connection forbidden from $si\n");
>>> sl_send_reply("403", "Forbidden");
>>> exit;
>>> }
>>> sql_result_free("res");
>>> }
>>>
>>> 10(4033) ERROR: <core> [db_ut.c:225]: db_str2time(): Error during time conversion
>>> 10(4033) ERROR: <core> [db_val.c:159]: db_str2val(): error while converting datetime value from string
>>> 10(4033) ERROR: db_mysql [km_row.c:68]: db_mysql_convert_row(): failed to convert value
>>> 10(4033) ERROR: db_mysql [km_res.c:190]: db_mysql_convert_rows(): error while converting row #0
>>> 10(4033) ERROR: db_mysql [km_res.c:219]: db_mysql_convert_result(): error while converting rows
>>> 10(4033) ERROR: db_mysql [km_dbase.c:252]: db_mysql_store_result(): error while converting result
>>> 10(4033) ERROR: <core> [db_query.c:188]: db_do_raw_query(): error while storing result10(4033) ERROR: sqlops [sql_api.c:454]: sql_exec_xquery(): cannot do the query
>>>
>>> Any help please
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> --
>> Daniel-Constantin Mierla
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>> Kamailio World Conference, May 27-29, 2015
>> Berlin, Germany - http://www.kamailioworld.com
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
More information about the sr-users
mailing list