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:
shownext (1997)
Unique Sort (2003)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
Please.. copies of Digest for 7/29 and 7/30? (1997)
Multiple shipping databases (1997)
NetSplat and WebCat2 (1997)
using showpage and showcart commands (1996)
The beginning (1997)
Location of Browser Info.txt file (1997)
PCS Frames (1997)
WebCat2 - [format thousands] (1997)
sort problems....bug or brain fart? (1997)
[shownext] and descending order (1997)
New public beta available (1997)
Append File help needed: example (2000)
PCS Emailer's role ? (1997)
can WC render sites out? (1997)
shownext (1997)
Setting user/password with a form. (2000)
forms and variables (1998)