Menu

#4 type mismatch error

open
nobody
None
2014-07-09
2014-04-08
Anonymous
No

Originally created by: jacekjaros

php artisan BaculaStats:collect

[Illuminate\Database\QueryException]
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "0.0833333333333333" (SQL: select * from "hoursstats" where "data" = 2014-04-08 and "server" = angel and "bytes" = 6884397 and "starttime" = 20
14-04-07 23:05:01 and "endtime" = 2014-04-07 23:10:06 and "timediff" = 00:05:04 and "hoursdiff" = 0.0833333333333333 and "hourbytes" = 82612764 limit 1)

Related

Tickets: #8

Discussion

  • Anonymous

    Anonymous - 2014-04-08

    Originally posted by: oliveiraped

    Jacek it's on Mysql or Postgres ?

     
  • Anonymous

    Anonymous - 2014-04-09

    Originally posted by: jacekjaros

    i believe the error is caused by escaping 'hoursdiff' variable:
    query with escaping:
    bacula=# select * from "hoursstats" where "data" = '2014-04-08' and "server" = 'angel' and "bytes" = 6884397 and "starttime" = '14-04-07 23:05:01' and "endtime" = '2014-04-07 23:10:06' and "timediff" = '00:05:04' and "hoursdiff" = '0.0833333333333333' and "hourbytes" = 82612764 limit 1;
    ERROR: invalid input syntax for integer: "0.0833333333333333"
    LINE 1: ...06' and "timediff" = '00:05:04' and "hoursdiff" = '0.0833333...

    query without escaping: ^
    bacula=# select * from "hoursstats" where "data" = '2014-04-08' and "server" = 'angel' and "bytes" = 6884397 and "starttime" = '14-04-07 23:05:01' and "endtime" = '2014-04-07 23:10:06' and "timediff" = '00:05:04' and "hoursdiff" = 0.0833333333333333 and "hourbytes" = 82612764 limit 1;
    id | data | server | starttime | endtime | bytes | hoursdiff | hourbytes | timediff
    ----+------+--------+-----------+---------+-------+-----------+-----------+----------
    (0 rows)

     
  • Anonymous

    Anonymous - 2014-05-12

    Originally posted by: jayme-github

    Facing the same error with PostgreSQL 8.3
    As I'm not familiar with the frameworks used here: Is there a quick workaround?

     

Log in to post a comment.

MongoDB Logo MongoDB