
Quote from Palamar on May 9, 2019, 4:19 pmI installed VisualNeo Web to test the new functionality and the truth that the localhost worked correctly but when creating a database with SQLite and having saved it in the compiled folder I can not recover the data and no idea how to include it without the SQLite tool included .... someone can throw a little "light", a small tutorial on how to save and recover data from a database ?. With the old plug was quite easy, I think here too but I can not understand it. Thanks and regards!.
Spanish:
He instalado VisualNeo Web para probar la nueva funcionalidad y la verdad que el localhost funcionó correctamente pero al crear una base de datos con SQLite y haber guardado la misma en la carpeta compilada no puedo recuperar los datos y ni idea de cómo incluirlo sin la herramienta SQLite incluída....alguien puede arrojar un poco de "luz", un mini tuto de cómo lograr guardar y recuperar datos de una base de datos?. Con el plug antiguo era bastante fácil, creo que acá tambien pero no logro comprenderlo. Gracias y Saludos!.
I installed VisualNeo Web to test the new functionality and the truth that the localhost worked correctly but when creating a database with SQLite and having saved it in the compiled folder I can not recover the data and no idea how to include it without the SQLite tool included .... someone can throw a little "light", a small tutorial on how to save and recover data from a database ?. With the old plug was quite easy, I think here too but I can not understand it. Thanks and regards!.
Spanish:
He instalado VisualNeo Web para probar la nueva funcionalidad y la verdad que el localhost funcionó correctamente pero al crear una base de datos con SQLite y haber guardado la misma en la carpeta compilada no puedo recuperar los datos y ni idea de cómo incluirlo sin la herramienta SQLite incluída....alguien puede arrojar un poco de "luz", un mini tuto de cómo lograr guardar y recuperar datos de una base de datos?. Con el plug antiguo era bastante fácil, creo que acá tambien pero no logro comprenderlo. Gracias y Saludos!.

Quote from luishp on May 9, 2019, 5:27 pmHola @palamar,
¿Has echado un vistazo a los ejemplos incluidos con la instalación?
Te recomiendo que comiences con neoPhpSimplestDataBase.neoapp que encontrarás en la carpeta neoPhpSamples.
Fíjate especialmente en el archivo config.php que puedes editar desde la aplicación neoPhpServer una vez tengas la app cargada. En realidad el proceso es muy sencillo una vez entiendes como funciona.English:
Have you taken a look at the examples included with the installation? I recommend you to start with neoPhpSimplestDataBase.neoapp that you will find in the folder neoPhpSamples. Look especially at the file config.php that you can edit from the application neoPhpServer once you have loaded the sample app. Actually the process is very simple once you understand how it works.
Hola @palamar,
¿Has echado un vistazo a los ejemplos incluidos con la instalación?
Te recomiendo que comiences con neoPhpSimplestDataBase.neoapp que encontrarás en la carpeta neoPhpSamples.
Fíjate especialmente en el archivo config.php que puedes editar desde la aplicación neoPhpServer una vez tengas la app cargada. En realidad el proceso es muy sencillo una vez entiendes como funciona.
English:
Have you taken a look at the examples included with the installation? I recommend you to start with neoPhpSimplestDataBase.neoapp that you will find in the folder neoPhpSamples. Look especially at the file config.php that you can edit from the application neoPhpServer once you have loaded the sample app. Actually the process is very simple once you understand how it works.

Quote from Palamar on May 9, 2019, 5:34 pmHola @luishp
Lo probé pero no acabo de entenderlo y no me está funcionando. Pregunto, la base de datos va dentro de la carpeta de la app compilada?... de cargar datos donde le indico donde debe mostrarlos?, tiene variables predefinidas como [recordImg]?. Perdoná Luis pero no lo agarro y además no me anda el ejemplo y es porque no estoy haciendo algo bien.
I tried it but I can not understand it and it's not working for me.
I ask, does the database go inside the folder of the compiled app? ...
of loading data where I indicate where to show them ?, has predefined variables like [recordImg] ?.
Sorry Luis but I do not get it and also I do not follow suit and it's because I'm not doing something right.
Hola @luishp
Lo probé pero no acabo de entenderlo y no me está funcionando. Pregunto, la base de datos va dentro de la carpeta de la app compilada?... de cargar datos donde le indico donde debe mostrarlos?, tiene variables predefinidas como [recordImg]?. Perdoná Luis pero no lo agarro y además no me anda el ejemplo y es porque no estoy haciendo algo bien.
I tried it but I can not understand it and it's not working for me.
I ask, does the database go inside the folder of the compiled app? ...
of loading data where I indicate where to show them ?, has predefined variables like [recordImg] ?.
Sorry Luis but I do not get it and also I do not follow suit and it's because I'm not doing something right.

Quote from luishp on May 9, 2019, 5:46 pm@palamar, no te preocupes y vamos paso a paso:
1) Abre la app de ejemplo (fíjate que ya debe existir una base de datos en la carpeta donde se compila la app llamada sampledatabase.db).
2) Compila la app con Project > Compile/Publish > Web Application (Asegúrate de no marcar "Empty Build Folder Before Compile", o de lo contrario se borrará la base de datos).
3) Abre Tools > neoPHP Server (Automáticamente detectará cual debe ser la carpeta de compilación y la sugerirá como root folder).
4) Pulsa el botón Start.
5) Abre el navegador que quieras y navega a localhost como URL.English:
@palamar, don't worry and let's go step by step:
1) Open the example app (note that there must already be a database called sampledatabase.db in the folder where the app is compiled).
2) Compile the app with Project > Compile / Publish> Web Application (Make sure you do not mark "Empty Build Folder Before Compile", otherwise the database will be deleted)
3) Open Tools> neoPHP Server (Automatically detect what the compilation folder should be and it will be suggested as root folder)
4) Press the Start button
5) Open the browser you want and navigate to localhost as the URL.
@palamar, no te preocupes y vamos paso a paso:
1) Abre la app de ejemplo (fíjate que ya debe existir una base de datos en la carpeta donde se compila la app llamada sampledatabase.db).
2) Compila la app con Project > Compile/Publish > Web Application (Asegúrate de no marcar "Empty Build Folder Before Compile", o de lo contrario se borrará la base de datos).
3) Abre Tools > neoPHP Server (Automáticamente detectará cual debe ser la carpeta de compilación y la sugerirá como root folder).
4) Pulsa el botón Start.
5) Abre el navegador que quieras y navega a localhost como URL.
English:
@palamar, don't worry and let's go step by step:
1) Open the example app (note that there must already be a database called sampledatabase.db in the folder where the app is compiled).
2) Compile the app with Project > Compile / Publish> Web Application (Make sure you do not mark "Empty Build Folder Before Compile", otherwise the database will be deleted)
3) Open Tools> neoPHP Server (Automatically detect what the compilation folder should be and it will be suggested as root folder)
4) Press the Start button
5) Open the browser you want and navigate to localhost as the URL.

Quote from Palamar on May 9, 2019, 6:00 pmBien, he logrado hacerla funcionar. Ahora bien, esto carga imágenes y guarda las entradas en la variable mencionada en el mensaje anterior. He visto el Php de esa app y es corto:
$sqlAlias[0]="loadTable"; $sqlQuerys[0]="SELECT * FROM Paintings"; $sqlMaxUserLevel[0]=-1;Si entiendo esto perfecto, es un query, y desde VisualNeo lo llama con el alias. El tema es cómo lo termina exponiendo en la variable....se trata de una variable predefinida (especial)?. En caso contrario donde la defino?
Gracias y Saludos!
Well, I've managed to make it work. Now, this loads images and saves the entries in the variable
mentioned in the previous message. I've seen the Php of that app and it's short:
If I understand this perfect, it is a query, and since VisualNeo calls it with the alias.
The subject is how it ends up by exposing in the variable .... is it a predefined (special) variable?
Otherwise, where do I define it?Thanks!
Bien, he logrado hacerla funcionar. Ahora bien, esto carga imágenes y guarda las entradas en la variable mencionada en el mensaje anterior. He visto el Php de esa app y es corto:
$sqlAlias[0]="loadTable"; $sqlQuerys[0]="SELECT * FROM Paintings"; $sqlMaxUserLevel[0]=-1;
Si entiendo esto perfecto, es un query, y desde VisualNeo lo llama con el alias. El tema es cómo lo termina exponiendo en la variable....se trata de una variable predefinida (especial)?. En caso contrario donde la defino?
Gracias y Saludos!
Well, I've managed to make it work. Now, this loads images and saves the entries in the variable
mentioned in the previous message. I've seen the Php of that app and it's short:
If I understand this perfect, it is a query, and since VisualNeo calls it with the alias.
The subject is how it ends up by exposing in the variable .... is it a predefined (special) variable?
Otherwise, where do I define it?
Thanks!

Quote from luishp on May 9, 2019, 6:20 pmBien, vamos bien...
La acción que ejecuta la SQL es esta:
neoPhpExecSql "db1" "loadTable" "" "parseData"Esta acción dice que se ejecute la SQL cuyo alias es loadTable sobre la base de datos cuyo alias es db1 y que cuando los datos estén cargados llame a la subrutina parseData. Los alias los utilizamos por razones de seguridad, así la sentencia SQL y el nombre de la base de datos quedan ocultos a cualquiera que vea el código fuente en el navegador. Ahora vamos a fijarnos en el cógigo de la subrutina parseData:
CreateEmptyArray [tableData] SetVar [tableData] [data] ArrayLen [tableData] [totalRecords] SetVar [currentRecord] 0 SetVar [recordId] [tableData([currentRecord])('id')] SetVar [recordPainting] [tableData([currentRecord])('painting')] SetVar [recordAuthor] [tableData([currentRecord])('author')] SetVar [recordImg] "./img/[tableData([currentRecord])('image')]"Fíjate que la subrutina recibe un parámetro del tipo STRING llamado Data con todos los datos devueltos por la Query. Esto se hace de manera automática pero debes definir el parámetro en la parte inferior de la subrutina.
La subrutina copia todos los datos a un Array y carga el primer registro (el número 0) de cada campo de la base de datos en una variable diferente.
Los botones adelante y atrás simplemente se mueven por los registros del Array.English:
Well, we are progressing ... The action that executes the SQL is this one:
neoPhpExecSql "db1" "loadTable" "" "parseData"This action executes the SQL whose alias is loadTable on the database whose alias is db1 and, when the data is loaded, calls the subroutine parseData. Aliases are used for security reasons, so the SQL statement and the name of the database are hidden from anyone who sees the source code in the browser. Now let's look at the code of the parseData subroutine:
CreateEmptyArray [tableData] SetVar [tableData] [data] ArrayLen [tableData] [totalRecords] SetVar [currentRecord] 0 SetVar [recordId] [tableData([currentRecord])('id')] SetVar [recordPainting] [tableData([currentRecord])('painting')] SetVar [recordAuthor] [tableData([currentRecord])('author')] SetVar [recordImg] "./img/[tableData([currentRecord])('image')]"Note that the subroutine receives a parameter of the type STRING called Data with all the data returned by the Query. This is done automatically but you must define the parameter at the bottom of the subroutine. The subroutine copies all the data to an Array and loads the first record (the number 0) of each field in the database into a different variable. The previous and next buttons simply move back and forth through the data of the Array.
Bien, vamos bien...
La acción que ejecuta la SQL es esta:
neoPhpExecSql "db1" "loadTable" "" "parseData"
Esta acción dice que se ejecute la SQL cuyo alias es loadTable sobre la base de datos cuyo alias es db1 y que cuando los datos estén cargados llame a la subrutina parseData. Los alias los utilizamos por razones de seguridad, así la sentencia SQL y el nombre de la base de datos quedan ocultos a cualquiera que vea el código fuente en el navegador. Ahora vamos a fijarnos en el cógigo de la subrutina parseData:
CreateEmptyArray [tableData]
SetVar [tableData] [data]
ArrayLen [tableData] [totalRecords]
SetVar [currentRecord] 0
SetVar [recordId] [tableData([currentRecord])('id')]
SetVar [recordPainting] [tableData([currentRecord])('painting')]
SetVar [recordAuthor] [tableData([currentRecord])('author')]
SetVar [recordImg] "./img/[tableData([currentRecord])('image')]"
Fíjate que la subrutina recibe un parámetro del tipo STRING llamado Data con todos los datos devueltos por la Query. Esto se hace de manera automática pero debes definir el parámetro en la parte inferior de la subrutina.
La subrutina copia todos los datos a un Array y carga el primer registro (el número 0) de cada campo de la base de datos en una variable diferente.
Los botones adelante y atrás simplemente se mueven por los registros del Array.
English:
Well, we are progressing ... The action that executes the SQL is this one:
neoPhpExecSql "db1" "loadTable" "" "parseData"
This action executes the SQL whose alias is loadTable on the database whose alias is db1 and, when the data is loaded, calls the subroutine parseData. Aliases are used for security reasons, so the SQL statement and the name of the database are hidden from anyone who sees the source code in the browser. Now let's look at the code of the parseData subroutine:
CreateEmptyArray [tableData]
SetVar [tableData] [data]
ArrayLen [tableData] [totalRecords]
SetVar [currentRecord] 0
SetVar [recordId] [tableData([currentRecord])('id')]
SetVar [recordPainting] [tableData([currentRecord])('painting')]
SetVar [recordAuthor] [tableData([currentRecord])('author')]
SetVar [recordImg] "./img/[tableData([currentRecord])('image')]"
Note that the subroutine receives a parameter of the type STRING called Data with all the data returned by the Query. This is done automatically but you must define the parameter at the bottom of the subroutine. The subroutine copies all the data to an Array and loads the first record (the number 0) of each field in the database into a different variable. The previous and next buttons simply move back and forth through the data of the Array.

Quote from Palamar on May 10, 2019, 3:02 pmAhora si Luis, muchísimas gracias por la explicación. Muy clara. Tengo otras preguntas pero iré abriendo otros post. Un saludo!.
Now Yes, Luis, thank you very much for the explanation. Very clear. I have other questions but I will open other posts. A greeting !.
Ahora si Luis, muchísimas gracias por la explicación. Muy clara. Tengo otras preguntas pero iré abriendo otros post. Un saludo!.
Now Yes, Luis, thank you very much for the explanation. Very clear. I have other questions but I will open other posts. A greeting !.