Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Sep 2008
    Location
    Montesano, Wa
    Posts
    285

    Adding Function to Mysql

    Anyone have some information or instructions on how to add a function to mysql. I have a script we need to use and uses a distance calculation. The function needs to be added to myslq and I have never done this. Any suggestions?

  2. #2
    Junior Member
    Join Date
    May 2009
    Posts
    9
    Without knowing what you are trying to accomplish its a little difficult. However, this should point you in the correct direction.

    http://dev.mysql.com/doc/refman/5.0/...functions.html
    http://www.databasejournal.com/featu...-Functions.htm

  3. #3
    Senior Member
    Join Date
    May 2009
    Posts
    179
    There are three ways to add new functions to MySQL:
    You can add functions through the user-defined function (UDF) interface. User-defined functions are compiled as object files and then added to and removed from the server dynamically using the CREATE FUNCTION and DROP FUNCTION statements.

    You can add functions as native (built-in) MySQL functions. Native functions are compiled into the mysqld server and become available on a permanent basis.

    Another way to add functions is by creating stored functions. These are written using SQL statements rather than by compiling object code. The syntax for writing stored functions is not covered here.

    Each method of creating compiled functions has advantages and disadvantages:
    If you write user-defined functions, you must install object files in addition to the server itself. If you compile your function into the server, you don't need to do that.
    Native functions require you to modify a source distribution. UDFs do not. You can add UDFs to a binary MySQL distribution. No access to MySQL source is necessary.
    If you upgrade your MySQL distribution, you can continue to use your previously installed UDFs, unless you upgrade to a newer version for which the UDF interface changes. For native functions, you must repeat your modifications each time you upgrade.........

  4. #4
    Senior Member
    Join Date
    Sep 2008
    Location
    Montesano, Wa
    Posts
    285
    Yeah i found that same description on their website Oracle - I was hoping to actually find some instructions on doing it.

  5. #5
    Guest Moderator ~ServerPoint~'s Avatar
    Join Date
    Nov 2007
    Posts
    1,846
    Do you have PHPmyadmin?
    ServerPoint.com - a true hosting company offering online presence solutions since 1998
    Web Hosting, colocation, dedicated servers, Virtual Private Server (VPS) hosting
    Wholly owned multi homed network, servers and facilities

  6. #6
    Senior Member
    Join Date
    Sep 2008
    Location
    Montesano, Wa
    Posts
    285
    Yes I do, Didnt think you could add something through that. Or can you ? ill have to look at that I guess. The developer of the script I have commisioned to have made is going to try a different route I think

  7. #7
    Senior Member
    Join Date
    Sep 2009
    Posts
    319
    Yes,you can add function with your PHPadmin.
    HostEase Web Hosting - Professional Web Hosting
    SoftLayer Datacenter and 99.9% Uptime Guarantee
    24/7/365 Technical Support
    Support Center|Call us at (302)-353-4678.

  8. #8
    Guest Moderator ~ServerPoint~'s Avatar
    Join Date
    Nov 2007
    Posts
    1,846
    Quote Originally Posted by RH1 View Post
    Yes I do, Didnt think you could add something through that. Or can you ? ill have to look at that I guess. The developer of the script I have commisioned to have made is going to try a different route I think
    You can create DB there and run sql queries
    ServerPoint.com - a true hosting company offering online presence solutions since 1998
    Web Hosting, colocation, dedicated servers, Virtual Private Server (VPS) hosting
    Wholly owned multi homed network, servers and facilities

  9. #9
    Senior Member
    Join Date
    Sep 2009
    Posts
    319
    You can write a sql file then run the application,Also you can do it with your phpadmin.phpadmin is used to manage your datebase.
    HostEase Web Hosting - Professional Web Hosting
    SoftLayer Datacenter and 99.9% Uptime Guarantee
    24/7/365 Technical Support
    Support Center|Call us at (302)-353-4678.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.