PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'admin' for column 'uid' at row 1.

#0 \xampp\htdocs\safestv\includes\database\database.inc(2135): PDOStatement->execute(Array)
#1 \xampp\htdocs\safestv\includes\database\database.inc(664): DatabaseStatementBase->execute(Array, Array)
#2 \xampp\htdocs\safestv\includes\database\mysql\query.inc(36): DatabaseConnection->query('INSERT INTO {si...', Array, Array)
#3 \xampp\htdocs\safestv\sites\all\modules\simple_contest\includes\simple_contest.api.inc(279): InsertQuery_mysql->execute()
#4 \xampp\htdocs\safestv\sites\all\modules\simple_contest\views\views_handler_field_simple_contest_selector.inc(134): simple_contest_save_result(Object(stdClass), Array)
#5 \xampp\htdocs\safestv\includes\form.inc(1430): simple_contest_selector_views_form_submit(Array, Array)
#6 \xampp\htdocs\safestv\includes\form.inc(844): form_execute_handlers('submit', Array, Array)
#7 \xampp\htdocs\safestv\includes\form.inc(364): drupal_process_form('views_form_mont...', Array, Array)
#8 \xampp\htdocs\safestv\includes\form.inc(123): drupal_build_form('views_form_mont...', Array)
#9 \xampp\htdocs\safestv\profiles\commerce_kickstart\modules\views\theme\theme.inc(146): drupal_get_form('views_form_mont...', Object(view), '  

That's the full error code. And it appears after I've clicked on "Confirm and finalize winner" button on the Contest page of any contest node.

Any ideas?

Comments

vinoth.3v’s picture

in that result selector view, add a uid column and set this column as uid column at contest settings page.

TahitiPetey’s picture

Status: Active » Closed (fixed)

Nice, that did the trick for this problem. Now I got another one (which I'll open a new ticket for!)

hendroutomo’s picture

Status: Closed (fixed) » Needs work

I still got this error
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'uid' at row 1: INSERT INTO {simple_contest_results} (nid, uid, wnid, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 5 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 1 ) in simple_contest_save_result() (line 327 of D:\webdata\sites\all\modules\simple_contest\includes\simple_contest.api.inc).

hendroutomo’s picture

Status: Needs work » Closed (fixed)

sory,..it's working but with this conditions:

  1. view field for uid needs to be in the bottom
  2. for selector, if you set the contest is user, your view must be type "User", and then add relationship to whatever you need