Source language: Translate to:

Signal to process Mysql data locally

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Signal to process Mysql data locally

Postby datadon » Tue May 27, 2008 7:03 am

I would like to hear any comments or ideas.

I would like to be able to process information locally on a computer rather than on a server for data uploaded to a databasse via a form page. Lets say (as a simple example) I have an online form that request information such as name, address, phone etc. And allows upload of an image. Store the info in a mysql database on the server. Image is stored on server.

Using Neobook tools, it is possible to create for example, a new html page that would show that information and picture using online links etc. The page can then be uploaded to the server.

That woulld required that when the form is filled out, something happen that would notify my local pc to begin processing the new mysql data. That is, go get the info from the database (using NeoBookDBPro) writing to a new html file and then uploading it.

The part I am not sure about is the initation of the signal to begin the process. I know forms can send emails. that might be one way. Or to do polling of the database in some fashion for a new record or ?

Any ideas on how to best handle this.

My reason for doing this is that I can do a lot of programming and processing via Neobook that I could not do via php coding so it would be a good way to process the information. Slower yes, but that may not be an issue for me.

Your thoughts are appreciated.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby Gaev » Tue May 27, 2008 9:33 am

Don:

Since you already have (or need to have) an html/php combo for remote users to fill out and have info stored in your mySQL database on your website ... the most logical design ... and efficient development ... would be to ...

- enhance the php/database to include with each record ... a timestamp of addition/update of records ... and a field to indicate that you have now processed the addition/update

- have your (local) machine query the database periodically for "outstanding records to be processed" ... and then do it, upload the output and update the database to indicate that the "outstanding records" have been processed


The update to the database could be achieved with a generic php script that accepted parameters e.g. ...

http://www.DonTheMagnifient.com/updateT ... cord=12345

... which could then be invoked from within your NeoBook publication (inside the browser object).
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby datadon » Wed May 28, 2008 6:36 am

Hi Gaev,

You then support the concept of polliing or querying the database for a change to a field. Also adding a field to indicate that it has been processed. I think that would work for me.

I am not sure I understood the:

The update to the database could be achieved with a generic php script that accepted parameters e.g. ...

http://www.DonTheMagnifient.com/updateT ... cord=12345


as the database could be updated using the NeoBookDBPro actions. Not being familar with php I am not sure how your url would work to update the database.

HOWEVER, I find this concept interesting. Since I am not real knowledgeable about how to create php pages that actually do things, I can still accomplish a lot of things with NB code and then upload the html pages. This creates a lot of possiblities with regard to ads and other types of static pages. Or personalizing of pages. Speed is the limitation with this, but in my application, that is not an issue.
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas

Postby Gaev » Wed May 28, 2008 7:06 am

Datadon:
I am not sure I understood the:

The update to the database could be achieved with a generic php script that accepted parameters e.g. ...

http://www.DonTheMagnifient.com/updateT ... cord=12345

as the database could be updated using the NeoBookDBPro actions. Not being familar with php I am not sure how your url would work to update the database.
Yes, you could use NeoBookDBPro to connect to an SQL database on your website ... but as per discussions on this forum ... you may need an accomodating web host and/or risk living with reduced access control ... in order to allow read/write access to your databases from programs that do not reside on the same machine as the database ... in order to conform to restrictions about local access only, you create a php script that resides on your server ... which you invoke from your pub (in a Browser object) on your local machine.

Hence the suggestion that a php script could be used ... which would ...

- enquire about the value received for variable record (kind of like how you can enquire about [CommandLine] in NeoBook pubs)

- fetch the corresponding record(s) and update the corresponding field

... you might also add additional parameters to the url for security reasons ... like authcode=letMeIn etc.

And, the process of having your (local) machine query the database periodically for "outstanding records to be processed" would also be achieved with another (similar) php script ... which you would invoke inside a Browser object ... and then extract the results (e.g. record numbers) into NeoBook variables using the available NeoBook/Javascript Interface facilities.
Since I am not real knowledgeable about how to create php pages that actually do things, I can still accomplish a lot of things with NB code and then upload the html pages.
As mentioned before, remote access capability and security are the real considerations.
This creates a lot of possiblities with regard to ads and other types of static pages. Or personalizing of pages. Speed is the limitation with this, but in my application, that is not an issue.
This may/may not be an issue depending on the eventual size of the database you are querying.


BTW, your Avatar Image is missing !
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby datadon » Wed May 28, 2008 9:52 am

We will talk about this more after I get something setup on the server. I appreciate your ideas and help.

I have been trying to upload a new avatar for sometime and it never updates. not sure what the issue is. it is 80x80, have tried gif and jpg. whatever I did before does not seem to work now. I may try just putting a link on my site and then ref the link.

Note:I just reference a link and now it works.

Don
Don

'If you want to get a brontosaurus from 'a' to 'b' then you ride the dinosaur - you don't carry it!'
User avatar
datadon
 
Posts: 389
Joined: Sun Apr 03, 2005 7:55 pm
Location: Lorena Texas


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests