Welcome Guest, Not a member yet? Register   Sign In
(RESOLVED)Get Data From View to Another View?
#6

[eluser]gtech[/eluser]
sorry I was probably being a little patronising, without intending to be.

four approaches I can think of if they help:

1) use some form of regular expression when getting the web content to extract the individual data and then save it in a database, then you can apply your own template to the data (i used this approach ages ago when extracting data from weather buoys from a html source, it meant I could send out text messages and display html. I had a background process that would parse out the data every half hour and insert it into the database), if the website html changes then you only need change the code to parse it out in one place.

2) pattern match out each block of html, and assign it to an race id in the database.. when you click on the race link the id is passed and then you can extract out the html block.

3) when the user clicks on the race link, an id is passed. the whole block of html is retrieved from the database and the individual race data is extracted out using a regular expression. Probably the least efficient, but I don't reckon it would take too long to parse the data.

4) passing blocks of HTML. I think in your case passing blocks of html around is wrong.. If using a href you will have to pass it through the url.... you could do this by base64 encoding the html, but I am unsure of the limit of characters you can send. you could post blocks of html through multiple forms and POST the data, but I think that is the most long-winded way to do it.

hope this helps


Messages In This Thread
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-15-2008, 11:09 AM
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-15-2008, 11:25 AM
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-15-2008, 04:50 PM
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-15-2008, 05:01 PM
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-16-2008, 07:46 AM
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-16-2008, 09:17 AM
(RESOLVED)Get Data From View to Another View? - by El Forum - 05-16-2008, 11:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB