Professional Web Applications Themes

MySQL? - Mac Programming

I'd like to query a MySQL database and then return the results in an an array. Can anyone recommend the best method for doing this? Thanks....

  1. #1

    Default MySQL?

    I'd like to query a MySQL database and then return the results in an an
    array.

    Can anyone recommend the best method for doing this?

    Thanks.
    Dave Guest

  2. #2

    Default Re: MySQL?

    User-Agent: OSXnews .1/b
    Xref: intern1.nntp.aus1.giganews.com comp.sys.mac.programmer.help:97455

    In message <2004020119022416807%davewintercommanderbondnet >
    Dave Winter <net> wrote:
     

    not sure what language you are using,
    but the easiest way that i know of is if you have access to something like PHP, you can have
    PHP return the array to your app (some kind of web interface)
    You can also use JAVA and its plugin .. but it is GPL so it will infect your code.

    -Anu
    --
    =================
    Anurodh Pokharel
    users.sf.net
    http://osxnews.sf.net
    Anurodh Guest

  3. #3

    Default Re: MySQL?

    Dave Winter <net> wrote:
     

    MySQL comes with a C client library and instructions on how to use it.
    Or get the MySQL Cookbook - it gives examples for doing this sort of
    thing in four different languages (Perl, Python, etc.). m.

    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

  4. #4

    Default Re: MySQL?

    On 2004-02-01 19:02:24 +0000, Dave Winter <net>
    said:
     
    array. 

    I'd like to be able to do this with Cocoa (Objective-C).
    Dave Guest

  5. #5

    Default Re: MySQL?

    On 2004-02-02 09:15:31 +0000, Dave Winter <net>
    said:
     
    said: [/ref]
    array. 
    > >[/ref]
    > I'd like to be able to do this with Cocoa (Objective-C).
    >[/ref]

    What I'm trying to do...

    With this app, I'd like to be able to query the database and return some
    results.

    Then, I'd like to edit some of the content that is returned to me, and then
    update it back to MySQL.
    Dave Guest

  6. #6

    Default Re: MySQL?

    On 2004-02-01 13:02:24 -0600, Dave Winter <net>
    said:
     
    array. 

    Here are some resources you might wish to investigate:

    Welling and Thomson - PHP and MySQL: Web Development - ISBN: 0-672-31784-2
    Greenspan and Bulger - MySQL/PHP Database Applications - ISBN: 0-7645-3537-4
    Eric Guest

  7. #7

    Default Re: MySQL?

    On 2004-02-02 13:56:17 +0000, Eric Vann <com>
    said:
     
    said: [/ref]
    array. 
    > >[/ref]
    > Here are some resources you might wish to investigate:
    >
    > Welling and Thomson - PHP and MySQL: Web Development - ISBN:[/ref]
    0-672-31784-2 
    0-7645-3537-4 

    I've actually got the first book :)

    I know PHP and MySQL, it's just I want to be able to create an app so that
    I can modify data on my PHP application. I want to create this app in
    Cocoa.

    So, PHP & MySQL isn't a problem, it's just getting data from and to the
    MySQL database (using Cocoa) that is.
    Dave Guest

  8. #8

    Default Re: MySQL?

    Dave Winter <net> wrote:
     

    Then my first answer applies. (Would have helped if you'd used the word
    "Cocoa" in your original question.) Just plop the C MySQL lib into your
    project and you're good to go. Took me about five minutes to implement a
    Cocoa app as a MySQL client with C API calls (and about a day to develop
    nice Objective-C wrappers around the whole affair). m.


    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

  9. #9

    Default Re: MySQL?

    On 02/02/2004, Dave Winter wrote in message
    <2004020217052416807%davewintercommanderbondnet >:
     

    Cocoa is programmed using Objective-C. Anything you can do in C
    will work perfectly in Objective-C. So look at the C programming
    examples in the book and use one to work out how to write your
    program.

    The simplest way may be to write a general-purpose routine to
    query the database and convert the returned values as an NSArray
    (or an NSMutableArray).

    Simon.
    --
    Posted using test version of software.
    Please tell me if anything isn't right.
    Simon Guest

  10. #10

    Default Re: MySQL?

    Dave Winter <net> wrote:
     
    > array. 
    >
    > I'd like to be able to do this with Cocoa (Objective-C).[/ref]

    Go right ahead. There are several free frameworks or you can just write
    your own front end to the C API that comes with MySQL (very easy, took
    me about a day). m.


    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

Similar Threads

  1. Replies: 2
    Last Post: February 14th, 10:54 AM
  2. Replies: 1
    Last Post: January 23rd, 12:06 PM
  3. Replies: 0
    Last Post: January 29th, 02:03 PM
  4. Replies: 0
    Last Post: January 24th, 10:55 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139