TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,019
  • Total Topics: 21,332
  • Online today: 1,062
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Need help with setting up a database.

Started by Mitch, March 19, 2006, 02:18:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mitch

I know this has like no place at all on here but you guys are usually pretty precise in help and pretty quick to do it.

What I am having trouble is setting this up.

So if anyone would help me out a bit heres the script.

Mitch

When you go to answer this assume I know nothing.

G6Cad

A little more info on what it is could be helpful, and what it suppose to do wouldent be bad eather ;)

G6Cad

In the install guide within your zip file you have all info  you need to get the database setup for this..

To set up your MySQL Database you will need to consult your hosting service. They have different protocols for setting it up. Once you get it setup follow the instructions below.


MySQL Table Instructions.

1. Once you open you Database, go down to "Create new table on database..."
and type "ads" in the "name" text box.

2. Then type "10" in the text box labeled "Fields" and click on GO.

3. On the next page, Going across from the left type "id" in the "Field" box.

4. Then in the "Type" select "INT"

5. In the box "Length/Values*", type "11"

6. Skip "Attributes" and in "Null" box select "null".

7 Go to the next line.

8. In the "Field" box type "name"

9. In the "Type" box select "VARCHAR".

10. In the box "Length/Values*", type "100".

11. Skip "Attributes" and in "Null" box select "null".

12. Go to the next line.

13. In the "Field" box type "email"

14. In the "Type" box select "VARCHAR".

15. In the box "Length/Values*", type "200".

16. Skip "Attributes" and in "Null" box select "null".

17. Go to the next line.

18. In the "Field" box type "category"

19. In the "Type" box select "VARCHAR".

20. In the box "Length/Values*", type "200".

22. Skip "Attributes" and in "Null" box select "null".

23. Go to the next line.

24. In the "Field" box type "item"

25. In the "Type" box select "VARCHAR".

26. In the box "Length/Values*", type "200".

27. Skip "Attributes" and in "Null" box select "null".

28. Go to the next line.

29. In the "Field" box type "price"

30. In the "Type" box select "VARCHAR".

31. In the box "Length/Values*", type "200".

32. Skip "Attributes" and in "Null" box select "null".

33. Go to the next line.

34. In the "Field" box type "info"

35. In the "Type" box select "TEXT".

36. In the box "Length/Values*", type "1000".  Some databases you can leave this alone.

37. Skip "Attributes" and in "Null" box select "null".

38. Go to the next line.

39. In the "Field" box type "agree"

40. In the "Type" box select "VARCHAR".

41. In the box "Length/Values*", type "100".

42. Skip "Attributes" and in "Null" box select "null".

43. In the "Field" box type "confirm"

44. In the "Type" box select "VARCHAR".

45. In the box "Length/Values*", type "100".

46. Skip "Attributes" and in "Null" box select "null".

47. In the "Field" box type "allow"

48. In the "Type" box select "VARCHAR".

49. In the box "Length/Values*", type "100".

50. Skip "Attributes" and in "Null" box select "null".

51. In the Default box type "<font color=red>New</font>"

52. Click Save.


-----------------------------------------------------------------

To set up your php script. . But depending on the hosting company this part of the script could be different.  Email the tech support of your hosting company and ask "What is the connection string protocol for the MySQL database?"

1. Right-click "config.php" and go to "open with..." and then "notepad".

2. Change $conf['database_name'] = "dtabasename";

3. $conf['database_host'] = "localhost";

4. $conf['database_login'] = "yourusername";

5. $conf['database_pass'] = "yourpassword";

6. Change $headers = "From: info@Ultimatephp.com\r\n";  to $headers = "From: you@youremailaddress.com\r\n";

7. Change $linkto = "ultimatephp.com"; to $linkto = "yourwebsite.com";

Save the script.


Another connection string we have come across is...

$dbh=mysql_connect ("localhost", "username", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database name");

If you have to do this one you will need to change

Upload everything to your website.  In the same folder as your other HTML Document.

Mitch

Yes I know what it says there. I just have no idea on how or where to set up a database.

G6Cad

In the same database as the one you are using for SMF and TP
There is no database install included, so you have to manually go in to your database and make the tables as described in the text i posted upove.

If you have phpmyadmin it should be pretty easy if you follow the description

Mitch

Ya I have phpmyadmin.
I have no idea how to do anything in that though.

I figured I would click on:
Create new database

But right underneath that it says:
Create new database: Documentation
No Privileges

gerrymo

You can create a new Db via cPanel if you need one. As this wont be integrated, I'd use another one and keep you SMF/TP clean of other stuff. If you can't create the Db yourself, your host should be able to help.

Mitch

-_- That sucks my host hasnt been online for like ever.

IchBin

If your host doesn't respond to your questions I'd find a new one.
This is something you're going to have to do by trial and error Mitch. When you create a database you can click on privledges and add a user to that database and give them permissions. I haven't had to create db's by scratch like that very often. What you're asking seems to be a long drawn out process for us here. I personally would like to see you do it, more so than us. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.