Connect to MySQL server with xcode

Posted by: Admin  :  Category: Mysql

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

sample code explains how to connect from xcode to mysql server, perfrom insert operation and display the result from server in xcode usin php You can download the source code from : dl.dropbox.com
Video Rating: 4 / 5

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

22 Responses to “Connect to MySQL server with xcode”

  1. picaldisport1988 Says:

    @iGhalia
    Thank you…
    The App run on my iPhone with 5.0. I am soooooo happy…
    Please make more Tutorials 😉

  2. iGhalia Says:

    @picaldisport1988 Thank you for your kind comment 🙂

    I am not sure what cause the error, because i tried it on 5.0 simulator and works fine. I searched the internet and i find stackoverflow website discuss this issue, you can search for (Applications are expected to have a root view controller at the end of application launch) at their website..
    Good Luck

  3. picaldisport1988 Says:

    Hello great Tutorial u are the King 😉
    With iPhone Simulator 4.3 is all ok but with Simulator 5.0 i become these Error:
    “Applications are expected to have a root view controller at the end of application launch”
    Can you help me please??

  4. iGhalia Says:

    @metalwarguitar you should be able to access the server and find where is your php file and copy its path to your objective-c code..

  5. metalwarguitar Says:

    your really helpfull, srry i ask so much :$, but how can i locate my .php file, it is online but if i press insert nothing will happen because i cant find the .php file

  6. iGhalia Says:

    @metalwarguitar you can download it from the link appears in the video info part

  7. metalwarguitar Says:

    what did you write in the .php file ??

  8. metalwarguitar Says:

    thnx man you helped me a lot

  9. mike68330 Says:

    Tanks for your Xcode, it is what I am looking …. But it do not work on my Mac. And I do not find why….. If some one can help me ….. Contact me on iChat, at contact….. Mike68330 or email mike68330@hotmail.com….. Thanks for all

  10. lacasitos57 Says:

    hanks,,,i just need to get data from a DB with in sql and create a array with mysqlfetch array for example and these array break it for the differents labels,imageview …. thanks,thanks

  11. lacasitos57 Says:

    hanks,,,i just need to get data from a DB with in sql and create a array with mysqlfetch array for example and these array break it for the differents labels,imageview …. thanks,thanks

  12. lacasitos57 Says:

    hanks,,,i just need to get data from a DB with in sql and create a array with mysqlfetch array for example and these array break it for the differents labels,imageview …. thanks,thanks

  13. lacasitos57 Says:

    hanks,,,i just need to get data from a DB with in sql and create a array with mysqlfetch array for example and these array break it for the differents labels,imageview …. thanks,thanks

  14. iGhalia Says:

    @lacasitos57 I will make tutorial for that ASAP, Thank you for watching…

  15. lacasitos57 Says:

    how do you for select information from database? thanks!

  16. lacasitos57 Says:

    podrias hacer uno de como selecionar datos de una bbdd con php gracias!

  17. iGhalia Says:

    @phreakii Welcome back again ^_^
    i think your question is related to php more than objective-c, in the php file you have to change the query to be
    sql = “select * from yourTable where userName = $uname and password = $pwd”;
    $res = mysql_query($sql,$con);
    $res1 = mysql_num_rows($res);
    if ($res1 != 0)
    echo “success”;
    else
    echo “fail”;

  18. iGhalia Says:

    @phreakii Hey,
    in this case you have to execute these code as you want
    NSString *strURL = [NSString stringWithFormat:@”your first query”];
    NSData *dataURL = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];

    strURL = [NSString stringWithFormat:@”your second query”];
    dataURL = [NSData dataWithContentsOfURL: [NSURL URLWithString:strURL]];

  19. phreakii Says:

    Hey, now its me again! : ) Ive got another question please.. Say i want to insert multiple querys in a database, and not only one as you showed?

  20. phreakii Says:

    @iGhalia Hello again! You answered so fast i forgot to answer back : ) Yes, you could say that. Because Ive been looking at other tutorials but dont seem that easy like this one. I would like a type of “login” feature from my iPhone, and thats why I need a reading feature. I probably can figure it out by looking at your tuorial 100 times again : ) But liked to have it explained if you got the time for it in the future! : ) Thanks from sweden!

  21. iGhalia Says:

    @phreakii Thank you for your support…
    it would be my pleasure to explain that, but i didn’t get what you mean by “check” command, would you give me example for that? do you mean read from database and present the data in xib file?

  22. phreakii Says:

    Great tutorial! But I have problem get this to work together with different .xib’s, not only the main one.

    But I have a wish from you. How to create a “check” instead of “insert” like this one? That would be great!

    Keep up the good work!

Leave a Reply

*