Re: Dealer Locator
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 70039
interpreted = N
texte = Alex the key to this little app is in my database. I used a stored procedure and a stored function. The function calls the procedure. I have the php code and a link to the mysql backup/restore routine.In the php code you will need to set the server/username/password/ db. I used localhost but your mileage may vary. In the sql routine you will need to set the "Definer" that is the mysql user that is actually executing the store procedure/function. Once you download the file do a search for 'yourusername' in this file and replace with your actual mysql username.Here is the php code";//echo $mydist . "
";//connect to DB//set your server, username, password and database here$mysqli = new mysqli("localhost", "username", "password", "CYBER_TOOLS");/* check connection */if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit();}// the SQL$query = "CALL GetNearbyZipCodes('$myzip',$mydist)";//echo $query;if ($result = $mysqli->query($query)) { /* fetch associative array */ echo "
"; while ($row = $result->fetch_assoc()) { echo $row["zipcode"] .","; } /* free result set */ $result->close();} echo "";/* close connection */$mysqli->close();?>Yeah not much to it as its all in the store procedure/function.Here is a link to the mysql db backup/restore It is fully safe for consumption, do a search for 'yourusername' in this file and replace with your actual mysql username:http://www.cybermill.com/tools/cyber_tools.sqlI use navicat for mysql administration it takes care of creating and editiing of the store procedure/functions. I am not sure if phpMyAdmin or other tools are capable of creating, editing or restoring this.Robert MinorDirector of Internet Services------------------------------------------------------------Cybermill Communicationshttp://www.cybermill.com http://www.merchantmaker.comProviding Ecommerce and interactive website development andhosting services on Macintosh, Windows NT, *nix, and AS/400.Complete ddos proof hosting solutions and network services.On Apr 8, 2008, at 09:45 39, Alex McCombie wrote:> Bob,> Yeah that might work. I have mysql on an apache/winbox as well but > perhaps I> can retro this to pure DNA.>> I do like the idea of the middle context to make this easily available> across multiple sites.>> Thanks.> Alex>>>>>> On 4/8/08 10:08 AM, "Bob Minor"
wrote:>>> Yeah I did,>>>> http://www.weeones.com/>>>> but I did it with a curl to a php/mysql page. I keep it as a tool for>> all my sites. And then whenever I need it I just access it via a curl>> like so:>>>> [middle startafter=&endbefore=][shell]curl>> "www.nameofyourserver.com/tools/getzips.php?zip=>> [zipcode]&dist=[within]">> [/shell][/middle]>>>> I can shoot you the mysql db and the php code if your interested. The>> php page returns a comma delimited list of zipcodes, between the>> I have it running on a xserve but I am sure it would >> run>> fine on a windows/linux box with php/msql>>>> Robert Minor>> -- > Alex J. McCombie>> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .>> Adventure Skies Interactive>> Box 124 Martville, NY 13111>> p. 315 .233 .9403>> e. Alex@AdventureSkies.com>> www.AdventureSkies.com>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to >> Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Alex the key to this little app is in my database. I used a stored procedure and a stored function. The function calls the procedure. I have the php code and a link to the mysql backup/restore routine.In the php code you will need to set the server/username/password/ db. I used localhost but your mileage may vary. In the sql routine you will need to set the "Definer" that is the mysql user that is actually executing the store procedure/function. Once you download the file do a search for 'yourusername' in this file and replace with your actual mysql username.Here is the php code";//echo $mydist . "
";//connect to DB//set your server, username, password and database here$mysqli = new mysqli("localhost", "username", "password", "CYBER_TOOLS");/* check connection */if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit();}// the SQL$query = "CALL GetNearbyZipCodes('$myzip',$mydist)";//echo $query;if ($result = $mysqli->query($query)) { /* fetch associative array */ echo ""; while ($row = $result->fetch_assoc()) { echo $row["zipcode"] .","; } /* free result set */ $result->close();} echo "";/* close connection */$mysqli->close();?>Yeah not much to it as its all in the store procedure/function.Here is a link to the mysql db backup/restore It is fully safe for consumption, do a search for 'yourusername' in this file and replace with your actual mysql username:http://www.cybermill.com/tools/cyber_tools.sqlI use navicat for mysql administration it takes care of creating and editiing of the store procedure/functions. I am not sure if phpMyAdmin or other tools are capable of creating, editing or restoring this.Robert MinorDirector of Internet Services------------------------------------------------------------Cybermill Communicationshttp://www.cybermill.com http://www.merchantmaker.comProviding Ecommerce and interactive website development andhosting services on Macintosh, Windows NT, *nix, and AS/400.Complete ddos proof hosting solutions and network services.On Apr 8, 2008, at 09:45 39, Alex McCombie wrote:> Bob,> Yeah that might work. I have mysql on an apache/winbox as well but > perhaps I> can retro this to pure DNA.>> I do like the idea of the middle context to make this easily available> across multiple sites.>> Thanks.> Alex>>>>>> On 4/8/08 10:08 AM, "Bob Minor" wrote:>>> Yeah I did,>>>> http://www.weeones.com/>>>> but I did it with a curl to a php/mysql page. I keep it as a tool for>> all my sites. And then whenever I need it I just access it via a curl>> like so:>>>> [middle startafter=&endbefore=][shell]curl>> "www.nameofyourserver.com/tools/getzips.php?zip=>> [zipcode]&dist=[within]">> [/shell][/middle]>>>> I can shoot you the mysql db and the php code if your interested. The>> php page returns a comma delimited list of zipcodes, between the>> I have it running on a xserve but I am sure it would >> run>> fine on a windows/linux box with php/msql>>>> Robert Minor>> -- > Alex J. McCombie>> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .>> Adventure Skies Interactive>> Box 124 Martville, NY 13111>> p. 315 .233 .9403>> e. Alex@AdventureSkies.com>> www.AdventureSkies.com>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to >> Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Bob Minor
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebCat2.0 [format thousands .0f] no go (1997)
Server Freeze (1998)
Cart Question (1998)
[Fwd: Rotating Banners ... (was LinkExchange)] (1997)
choice of images (2000)
Archives... (1997)
Random tags HELP!!!! (1999)
Criticism of WebCatalog: Keep It Coming! (1998)
More Hide IFs (2000)
'does not contain' operator needed ... (1997)
Round up prices (2000)
Mac 2.1b2 speed (1997)
Emailer (1997)
WCS Newbie question (1997)
Custom Shipping Charges (1997)
WebMerchant when CC network is down (1998)
RE: Fishing: anyone on this group willing to do support? (1998)
Error Lob.db records error message not name (1997)
newbies to web, spaces in email address (1998)
[WebDNA] v7 problem? (2012)