Primary key problem [SOLVED]

Discuss everything related to ApPHP DataGrid Wizard utility. All versions. Any questions related to the ApPHP DataGrid Wizard developing or using should be posted to this forum.

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

HLEBOEUF
Senior
Senior
Posts: 27
Joined: Jan 21st, '10, 17:17

Primary key problem [SOLVED]

Postby HLEBOEUF » Aug 21st, '11, 18:10

Hello,

My table has a INT as primary key with the AutoIncrement on, but still the insert tries to add a alfa code into it !

Code: Select all

search sql (total: 0) SELECT daa_id, daa_jaar, daa_naam, daa_klasse FROM dwe_admin_activ WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10
insert sql (totaal: -1) INSERT INTO dwe_admin_activ (eration_randomize_code, daa_jaar, daa_naam, daa_klasse) VALUES ('dneqruaf42900f59tq0t', 1, '2', '3')
search sql (totaal: 0) SELECT * FROM dwe_admin_activ ORDER BY daa_id DESC LIMIT 0, 10
search sql (totaal: 0) SELECT daa_id, daa_jaar, daa_naam, daa_klasse FROM dwe_admin_activ WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10
Fouten:
1) INSERT INTO dwe_admin_activ (eration_randomize_code, daa_jaar, daa_naam, daa_klasse) VALUES ('dneqruaf42900f59tq0t', 1, '2', '3')
[nativecode=1054 ** Unknown column 'eration_randomize_code' in 'field list']
POST: Array ( [_operation_randomize_code] => dneqruaf42900f59tq0t [ryydaa_jaar] => 1 [ryydaa_naam] => 2 [ryydaa_klasse] => 3 )
GET: Array ( [mode] => update [rid] => -1 [sort_field] => 1 [sort_field_by] => [sort_field_type] => [sort_type] => ASC [page_size] => 10 [p] => 1 [new] => 1 )

administrator
Site Admin
Site Admin
Posts: 5992
Joined: Jan 7th, '09, 23:18
Contact:

Re: Primary key problem

Postby administrator » Aug 22nd, '11, 08:29

Yes, we see this issue. Please try to add any unique prefix for your datagrid (you may see this field at the top of wizard page)
does it help now?

HLEBOEUF
Senior
Senior
Posts: 27
Joined: Jan 21st, '10, 17:17

Re: Primary key problem

Postby HLEBOEUF » Aug 23rd, '11, 15:29

Yep, Solves the problem.

My mistake

thilbert05
Newbie
Newbie
Posts: 1
Joined: Mar 3rd, '15, 16:47

Re: Primary key problem [SOLVED]

Postby thilbert05 » Mar 3rd, '15, 17:02

I have the same error as follows:

search sql (total: 10) SELECT id,(SELECT CONCAT(nombre,' ',apellido) FROM informacion_usuarios a WHERE a.correo = b.correo) as nombre,complejo,comentario,asunto,fecha,estado FROM solicitudes b where complejo in (SELECT complejo from admin_complejos where correo = 'email') ORDER BY 1 ASC LIMIT 0, 10

update sql (total: -1) UPDATE solicitudes SET eration_randomize_code = 'pbo8lrq7ttfnhahvoyjc' , correo = 'email' , complejo = 'PH EVEREST' , estado = 'C' , comentario = 'p1' , asunto = 'p1' , nombre_imagen = '' , fecha = '2014-12-26' WHERE id = '107'

search sql (total: 10) SELECT id,(SELECT CONCAT(nombre,' ',apellido) FROM informacion_usuarios a WHERE a.correo = b.correo) as nombre,complejo,comentario,asunto,fecha,estado FROM solicitudes b where complejo in (SELECT complejo from admin_complejos where correo = 'email') ORDER BY 1 ASC LIMIT 0, 10

POST: Array ( [_operation_randomize_code] => pbo8lrq7ttfnhahvoyjc [stycorreo] => email [rtycomplejo] => PH EVEREST [styestado] => C [stycomentario] => p1 [styasunto] => p1 [stynombre_imagen] => [styfecha] => 2014-12-26 )

GET: Array ( [mode] => update [rid] => 107 [sort_field] => 1 [sort_field_by] => [sort_field_type] => [sort_type] => ASC [page_size] => 10 [p] => 1 )

The updating operation uncompleted! Record # 107

Using ApPHP DataGrid v4.2.8

administrator
Site Admin
Site Admin
Posts: 5992
Joined: Jan 7th, '09, 23:18
Contact:

Re: Primary key problem [SOLVED]

Postby administrator » Mar 4th, '15, 15:28

You have to define unique prefix!


Return to “ApPHP DataGrid Wizard {developers/users}”