garry27 Posted November 27, 2006 Share Posted November 27, 2006 hi i'm working on this problem right now and hoping that anyone can advice me.i've created a google map on my site which plots pubs on the map according to a predfined filter. if you click on a marker, it opens an info box.you can view an example of this at:http://www.nl-webspace.co.uk/~unn_p921847/test5/create_crawl.php?postcode=dl3+7&=Generate+Map&lat=54.524800208734&lng=-1.5606556890128my next task is to create a function that allows a user to click on a link on the infobox which adds the pub to a pubcrawl list on the browser. i plan to do this using the ajax approach-making asynchronous calls each time a change is made to the publist. i can see 2 ways of doing this and i'm looking to find the easiest solution.1. to create a new table each time a new pub is added to the list: CREATE TABLE Pub_Crawl_Order_1(crawlID INT UNSIGNED NOT NULL AUTO_INCREMENT,entry1entry2entry3entry4...PRIMARY KEY(CrawlID));entries in the entry{i} value is the PubID which resides on a separate table2. to add all orders of pub crawl data on a signle tableCREATE TABLE Pub_Crawl_Order(crawlID INT UNSIGNED NOT NULL,crawlOrder INT UNSIGNED NOT NULL,userEmail VARCHAR(50) NOT NULL,PRIMARY KEY(CrawlID));in this case crawlOrder will contain a string of PubID'sthe main concern with the first approach is in creating a new table each time a new pub crawl is made, with an appropriate name. i.e. in number increments of Pub_Crawl_Order_{i}.with the second approach, i'm not sure how easy it would be to swap substrings inside a single cell in order to create a pub order?all ideas welcome? Link to comment https://forums.phpfreaks.com/topic/28589-using-ajax-to-update-data-in-tables-with-mysql/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.