monkepinay Posted September 27, 2007 Share Posted September 27, 2007 Hi all, I see this seems to be the place to live if you are just getting use to PHP and MySQL like my self. How ever, I have to admit I took on a project that I had no business doing. At first a friend asked my to make him a web page, I thought, "no big, deal. I've done it a thousand times before." However, I'm coming to find out that something he is asking me to do for him is including a database, which frankly I just can't do right now. I'm just now taking a SQL class, and I don't really know how I'm passing. I'm not even sure if it's SQL, I think it's Oracle, but I don't know the difference. I was just told that I had to take this class to get my AS so I got it online a turn in an assignment every week. But I digress The point I'm using godaddy as the server for this side (because the guy signed up for it before I had any say) and I've never used them before, let alone ever tried to use a data base on their server. So I want to do a data base, and I know the first thing to do is to create a table. I tried using the mysql query thing to drop a table but that gives me errors, and I tried to use the form that they have to create a table, but that gives me errors too. Which is freaking me out because I thought the whole thing was idiot proof. So... what should my first step in making my first table in godaddy be. Maybe I'm using the wrong syntax because I'm actually use to oracle or something? If anybody is familiar with godaddy please please help this noob. Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/ Share on other sites More sharing options...
fenway Posted September 27, 2007 Share Posted September 27, 2007 There's nothing special about making a table there vs. anywhere else... find a control panel, and issue statements. Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-356646 Share on other sites More sharing options...
monkepinay Posted September 29, 2007 Author Share Posted September 29, 2007 This might be a little more helpful with making clear what I need help with, sorry I didn't do this sooner. when I click on control panel this is what it looks like then I click on data base then I click on mysql now the database I wan to use is city motors. there is currently nothing in it. I click on open manager and it prompts me for my pass word. afterward I get a window that looks like this Now when I'm in class and I want to make/add to a table I would go to something that looks like this Which Is what I get when I click on Query Window. ------------------- I think it's that I'm not coding correctly, but I'm not sure. Is it possible that I'm not going to the right place to make the first table for this database? This is an example of code that I use when I'm in class that works in class but not here. DROP TABLE CUSTOMERS; Create table Customers (Customer# NUMBER(4) PRIMARY KEY, LastName VARCHAR2(10), FirstName VARCHAR2(10), Address VARCHAR2(20), City VARCHAR2(12), State VARCHAR2(2), Zip VARCHAR2(5), Referred NUMBER(4)); INSERT INTO CUSTOMERS VALUES (1001, 'MORALES', 'BONITA', 'P.O. BOX 651', 'EASTPOINT', 'FL', '32328', NULL); Commit; Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-357713 Share on other sites More sharing options...
monkepinay Posted September 29, 2007 Author Share Posted September 29, 2007 oh and this is the error I get with that sample code Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-357715 Share on other sites More sharing options...
wildteen88 Posted September 29, 2007 Share Posted September 29, 2007 When you get to this screen: You see where it says (Databases)... in the drop down menu on the left you have to choose a database to use. When you select a database from that menu you should be shown a table editor on the right hand side/or an option to create a table if there is no tables currently available for that database. Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-357894 Share on other sites More sharing options...
monkepinay Posted September 29, 2007 Author Share Posted September 29, 2007 When you get to this screen: **img** You see where it says (Databases)... in the drop down menu on the left you have to choose a database to use. When you select a database from that menu you should be shown a table editor on the right hand side/or an option to create a table if there is no tables currently available for that database. Wow!! I can't believe what a simple mistake I was making, I really appreciate it. Golly I feel so simple / special ed right now. Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-358045 Share on other sites More sharing options...
monkepinay Posted September 29, 2007 Author Share Posted September 29, 2007 Ok... Another Question Well not really a question, but... well yea... Um can anybody point me in the right direction as far as having a php page to add values to the table, maybe in conjunction with a form of sorts? Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-358056 Share on other sites More sharing options...
fenway Posted October 1, 2007 Share Posted October 1, 2007 oh and this is the error I get with that sample code You need "IF EXISTS". Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-358980 Share on other sites More sharing options...
fenway Posted October 1, 2007 Share Posted October 1, 2007 Ok... Another Question Well not really a question, but... well yea... Um can anybody point me in the right direction as far as having a php page to add values to the table, maybe in conjunction with a form of sorts? Same place as before, go to the table screen by clicking on the table... you may want to look though some phpmyadmin tutorials. Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-358981 Share on other sites More sharing options...
monkepinay Posted October 2, 2007 Author Share Posted October 2, 2007 Same place as before, go to the table screen by clicking on the table... you may want to look though some phpmyadmin tutorials. Do you have any suggestions that are for the simple minded. I mean, I am familiar with form and with php but, what I know is limited to extremely basic...ness Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-359791 Share on other sites More sharing options...
fenway Posted October 2, 2007 Share Posted October 2, 2007 Suggestions for what? Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-360014 Share on other sites More sharing options...
markjoe Posted October 2, 2007 Share Posted October 2, 2007 Um can anybody point me in the right direction as far as having a php page to add values to the table, maybe in conjunction with a form of sorts? Is this what you're looking for? http://www.phpfreaks.com/tutorials/142/0.php Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-360184 Share on other sites More sharing options...
monkepinay Posted October 3, 2007 Author Share Posted October 3, 2007 Um can anybody point me in the right direction as far as having a php page to add values to the table, maybe in conjunction with a form of sorts? Is this what you're looking for? http://www.phpfreaks.com/tutorials/142/0.php yes actually that is some what help full. By the way, how do I know what my local host is if I'm using godaddy? I tried my domain name and that really isn't working. is the the dns thing? Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-360539 Share on other sites More sharing options...
TheFilmGod Posted October 3, 2007 Share Posted October 3, 2007 "localhost" doesn't apply to you. Since you aren't hosting it on the same machine as your mysql/db. Awhile ago godaddy gave you a link on the mysql table page (before you go into phpmyadmin) that actually gave a snippet of code to connect to the db and to query a single row. Here is mine. Change your parameters: <?php //Connect To Database $hostname="h50mysql13.secureserver.net"; $username="username"; $password="toostupidtomakearealpassword"; $dbname="wwpknights"; mysql_connect($hostname,$username, $password) OR DIE ("Unable to connect to database! Please try again later."); mysql_select_db($dbname); ?> EDIT: I use godaddy. Do not assume "localhost" EVER! I wasted three months getting annoyed over the whole thing until I figured out localhost doesn't apply to me... :-X Quote Link to comment https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-360563 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.