Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/
Share on other sites

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

controlpanel.jpg

then I click on data base

db-cp.jpg

then I click on mysql

mysql.jpg

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

citymotors.jpg

Now when I'm in class and I want to make/add to a table I would go to something that looks like this

querywindow.jpg

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;

 

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-357713
Share on other sites

When you get to this screen:

citymotors.jpg

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.

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-357894
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-358045
Share on other sites

 

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.

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-358981
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-359791
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-360539
Share on other sites

"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

Link to comment
https://forums.phpfreaks.com/topic/70938-help-with-godaddy/#findComment-360563
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.