OS info
- Operating System : Mac OSX 17.7.0
- Wappler Version : 1.9.9
Problem description
ERROR 500
I’m trying to insert several records on my database through a repeating insert query.
ERROR 500
I’m trying to insert several records on my database through a repeating insert query.
I can not speak for others that may try to help you out, but I would need more information to be able to assist you.
Could you post screenshots of your insert page in Wappler?
@smartfun could you please follow what is explained in the tutorial I sent you and send me the error message reported in your browser console?
code | “HY000” |
---|---|
file | “/Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/db/Connection.php” |
line | 88 |
message | “SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘’ for column ‘imageDisplyOrder’ at row 1” |
trace | “#0 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/db/Connection.php(88): PDOStatement->execute()\n#1 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/modules/dbupdater.php(38): lib\db\Connection->execute(‘INSERT INTO `im…’, Array)\n#2 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(159): modules\dbupdater->insert(Object(stdClass), ‘insImatges’)\n#3 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(128): lib\App->execSteps(Object(stdClass))\n#4 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Array)\n#5 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/modules/core.php(62): lib\App->exec(Object(stdClass), true)\n#6 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(159): modules\core->repeat(Object(stdClass), ‘repeat’)\n#7 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(128): lib\App->execSteps(Object(stdClass))\n#8 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(98): lib\App->execSteps(Array)\n#9 /Applications/MAMP/htdocs/WapGaleries/dmxConnectLib/lib/App.php(71): lib\App->exec(Object(stdClass))\n#10 /Applications/MAMP/htdocs/WapGaleries/dmxConnect/api/Imatges/ImInserta.php(8): lib\App->define(Object(stdClass))\n#11 {main}” |
well this error explains it … you are storing something else (or nothing) in the field that need to be integer number.
In which step is the variable ‘ImageDisplayOrder’ filled?
I did this following the 22 videos tutorial “Creating an Image Gallery”, appeared in YouTube (Wappler account) since 14/10/2018. On the database (table “Images”) of this tutorial is a field named “Imageorder” than I can’t see which server side action fills it. My temporary solution is define this field as “Null” allowed. I think this is not a good solution and needs to fix this mistake. Thanks
Well usually in your Server Connect Action, you have the variable defined as $_POST input field that you use afterwards in your own database insert/update step, see:
Thank you to George, Teodor, scott. All of you have given a lot of solutions and ideas to me.