Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Application Development » ERROR: 22P02: invalid input syntax for integer ( LINE 1: SELECT count(*) FROM idps WHERE uid='' ^ LOCATION: pg_atoi, numutils.c:52)
Re: ERROR: 22P02: invalid input syntax for integer [message #4944 is a reply to message #4943] Thu, 27 August 2015 21:41 Go to previous messageGo to previous message
rafs is currently offline  rafs
Messages: 69
Registered: May 2015
Member
The entire error log shows that "uid: string = null" is being sent to insertRecord.
My guess is that since uid is a unique key, the framework/DAO is trying to validate the uniqueness of 'uid' before the insertRecord by doing a SELECT query with the given value in the form, but this value is null and the framework is expecting a value here. But this is an auto_increment value (but not a PK)...

The rest of the error log entry is below...
2015-07-22 00:59:21
Fatal Error: PostgreSQL: ERROR: 22P02: invalid input syntax for integer: "" LINE 1: SELECT count(*) FROM idps WHERE uid='' ^ LOCATION: pg_atoi, numutils.c:52
SQL query: SELECT count(*) FROM idps WHERE uid=''
Error in line 578 of file 'C:\xampp\radicore\includes\dml.pgsql.class.inc'.

Host Info: idp-etl2.eng.sonicwall.com, Server Version: 9.3.6
Client Encoding: UTF8, Server Encoding: UTF8
Database: NSDB2, Schema: "NSDB2", PUBLIC

PHP_SELF: /radicore/nsdb2/idps(add1).php

CURRENT DIRECTORY: C:\xampp\htdocs\radicore\nsdb2

SERVER_ADDR: 10.204.23.21

User Id: MGR

Role Id: GLOBAL

REQUEST_URI: /radicore/nsdb2/idps(add1).php

Page Stack:

  [0] main_menu
  [1] nsdb2
  [2] nsdb2_idps(list1)
  [3] nsdb2_idps(add1)

Backtrace:

0: array =
  function: string = errorHandler
  args: array =
    0: integer = 256
    1: string = PostgreSQL: ERROR:  22P02: invalid input syntax for integer: ""
LINE 1: SELECT count(*) FROM idps WHERE uid=''
                                            ^
LOCATION:  pg_atoi, numutils.c:52
    2: string = C:\xampp\radicore\includes\dml.pgsql.class.inc
    3: integer = 578
    4: object = pgsql
1: array =
  file: string = C:\xampp\radicore\includes\dml.pgsql.class.inc
  line: integer = 578
  function: string = trigger_error
  args: array =
    0: string = PostgreSQL: ERROR:  22P02: invalid input syntax for integer: ""
LINE 1: SELECT count(*) FROM idps WHERE uid=''
                                            ^
LOCATION:  pg_atoi, numutils.c:52
    1: integer = 256
2: array =
  file: string = C:\xampp\radicore\includes\dml.pgsql.class.inc
  line: integer = 1040
  function: string = getCount
  class: string = pgsql
  type: string = ->
  args: array =
    0: string = nsdb2
    1: string = idps
    2: string = SELECT count(*) FROM idps WHERE uid=''
3: array =
  file: string = C:\xampp\radicore\includes\std.table.class.inc
  line: integer = 7653
  function: string = insertRecord
  class: string = pgsql
  type: string = ->
  args: array =
    0: string = nsdb2
    1: string = idps
    2: array =
      uid: string = null
      idp_type: string = idp
      idp_id: string = 1
      idp_calc: string = idp:1
      idp_status: string = 0
      created_date: string = 2000-01-01 00:00:00
      created_user: string = SYSTEM
      revised_date: string = null
      revised_user: string = null
4: array =
  file: string = C:\xampp\radicore\includes\std.table.class.inc
  line: integer = 4180
  function: string = _dml_insertRecord
  class: string = Default_Table
  type: string = ->
  args: array =
    0: array =
      uid: string = null
      idp_type: string = idp
      idp_id: string = 1
      idp_calc: string = idp:1
      idp_status: string = 0
      created_date: string = 2000-01-01 00:00:00
      created_user: string = SYSTEM
      revised_date: string = null
      revised_user: string = null
5: array =
  file: string = C:\xampp\radicore\includes\std.add1.inc
  line: integer = 104
  function: string = insertRecord
  class: string = Default_Table
  type: string = ->
  args: array =
    0: array =
      uid: string = null
      idp_type: string = idp
      idp_id: string = 1
      idp_calc: string = idp:1
      idp_status: string = 0
      created_date: string = 2000-01-01 00:00:00
      created_user: string = SYSTEM
      revised_date: string = 
      revised_user: string = 
6: array =
  file: string = C:\xampp\htdocs\radicore\nsdb2\idps(add1).php
  line: integer = 9
  args: array =
    0: string = C:\xampp\radicore\includes\std.add1.inc
  function: string = require


[Updated on: Thu, 27 August 2015 21:43]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to provide choices for two compound foreign keys in a form?
Next Topic: Running batch jobs
Goto Forum:
  


Current Time: Thu Nov 21 13:09:25 EST 2024

Total time taken to generate the page: 0.01067 seconds