
Quote from luishp on December 21, 2019, 9:11 amHi Coudroy,
Don't worry.
Please go to File > Open menu and navigate and open this file within your folder system:My Documents/VisualNEO Web/Sample Apps/neoPhpSamples/neoPhpSimplestDataBase.neoapp
Then execute the application so you can see how it works:
- Compile the Application: Project > Compile/Publish (Select Web Application) and be sure "Empty build folder" option is unchecked.
- Go to menu Tools > neoPHP Server and press the "Start" button.
- Open your favourite Web Browser (ForeFox, Chrome...) and navigate to this URL: "localhost"
- The App will start running. Then press the "Load Data from DB" button.
- Use the orange buttons under the picture to navigate the different records in the database.
Now go back to VisualNEO Web and be sure to explore the subroutine and the buttons code by double clicking them.
This is the simplest database application I can think of.
As an example this is the code to show the next record:If [currentRecord] < [totalRecords]-1 SetVar [currentRecord] [currentRecord]+1 EndIf SetVar [recordId] [tableData([currentRecord])('id')] SetVar [recordPainting] [tableData([currentRecord])('painting')] SetVar [recordAuthor] [tableData([currentRecord])('author')] SetVar [recordImg] "./img/[tableData([currentRecord])('image')]"tableData is the JSON object where all the data has been loaded.
id, painting, author and image are the different fields.
[currentRecord] is the variable wich stores the value with the "record number" currently active.Please let me know if you have any doubt.
It's easier than it seems!Regards.
Hi Coudroy,
Don't worry.
Please go to File > Open menu and navigate and open this file within your folder system:
My Documents/VisualNEO Web/Sample Apps/neoPhpSamples/neoPhpSimplestDataBase.neoapp
Then execute the application so you can see how it works:
Now go back to VisualNEO Web and be sure to explore the subroutine and the buttons code by double clicking them.
This is the simplest database application I can think of.
As an example this is the code to show the next record:
If [currentRecord] < [totalRecords]-1
SetVar [currentRecord] [currentRecord]+1
EndIf
SetVar [recordId] [tableData([currentRecord])('id')]
SetVar [recordPainting] [tableData([currentRecord])('painting')]
SetVar [recordAuthor] [tableData([currentRecord])('author')]
SetVar [recordImg] "./img/[tableData([currentRecord])('image')]"
tableData is the JSON object where all the data has been loaded.
id, painting, author and image are the different fields.
[currentRecord] is the variable wich stores the value with the "record number" currently active.
Please let me know if you have any doubt.
It's easier than it seems!
Regards.

Quote from CDY@44 on December 21, 2019, 2:21 pmHi Luis,
I'm sorry, I must have expressed myself badly. I understand the procedure for working with the database. Following the examples, in fact it's simple.I managed to recover the JSON file corresponding to the 'name' column.But I don't know how to fill in the different elements of a 'combobox from the JSON file.I understood that it is necessary to make a loop, but I do not see how to do it ...I send you what I have done.
Best regards,
Hi Luis,
I send you what I have done.
Best regards,

Quote from luishp on December 21, 2019, 3:04 pmTry this:
Loop 0 [totalRecords] [counter] SetVar [recordName] [tableData([counter]) ('name')] ListBoxAddItem "Combobox1" "[recordName]" "[recordName]" EndLoopRegards.
Try this:
Loop 0 [totalRecords] [counter]
SetVar [recordName] [tableData([counter]) ('name')]
ListBoxAddItem "Combobox1" "[recordName]" "[recordName]"
EndLoop
Regards.

Quote from CDY@44 on December 21, 2019, 11:32 pmI try this, but when I check the " ListBoxGetSelectedItem "Combobox1" [selectedItem]" I would like to have a value to make a SELECT (sql) in my database, according the value of [selectedItem], but the value I have is : $App.recordName...
I try this, but when I check the " ListBoxGetSelectedItem "Combobox1" [selectedItem]" I would like to have a value to make a SELECT (sql) in my database, according the value of [selectedItem], but the value I have is : $App.recordName...

Quote from luishp on December 22, 2019, 10:58 pmHi @cdy44-2
Sorry, it's a bug in the ListBoxAddItem command. It does not add values correctly to the ListBox when it's a variable.
I have fixed it and will work fine in next version.
Until it's released, please take a look at the attached app (yours modified). It has a subroutine ListBoxAddItemFixed to be used instead of ListBoxAddItem command.
Thank you!
Hi @cdy44-2
Sorry, it's a bug in the ListBoxAddItem command. It does not add values correctly to the ListBox when it's a variable.
I have fixed it and will work fine in next version.
Until it's released, please take a look at the attached app (yours modified). It has a subroutine ListBoxAddItemFixed to be used instead of ListBoxAddItem command.
Thank you!
Quote from abuamro2003 on February 28, 2020, 12:32 amHi
Really we need clear steps tutorial on how to connect to MySQL DB
December 3, 2019, 6:30 pmHi @cdy44-2,
Yes, I want to add those tutorials in video and/or text format.
Unfortunately currently I do not have time enough but I'm very aware about the importance of such information.
Meanwhile please take a look at the included samples and ask whatever you need here in the forums.
Thank you for your understanding.Best regards.
Hi
Really we need clear steps tutorial on how to connect to MySQL DB
Hi @cdy44-2,
Yes, I want to add those tutorials in video and/or text format.
Unfortunately currently I do not have time enough but I'm very aware about the importance of such information.
Meanwhile please take a look at the included samples and ask whatever you need here in the forums.
Thank you for your understanding.
Best regards.