943,699 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jun 30th, 2009
0

Re: Database - CPanel

I just want to add I guess I don't exactly have to have the data on the same page change..or maybe I want to I'm not sure. See, with most other fansites when you search for things you can specify your search and it will show what you want..well that might be a little more advanced but, the point is, it shows up on the same page no matter what you choose you want to search for. The only thing that changes is the content that shows up.
Reputation Points: 10
Solved Threads: 0
Light Poster
Spunky is offline Offline
34 posts
since Jun 2009
Jul 2nd, 2009
0

Re: Database - CPanel

Glad to see you got it to work.

Images can be stored in a varbinary field, or you store the image on the server as file, and put only the filename as string in the db.

I'm not quite sure what you want to achieve with your links. Could you give a small example?
Sponsor
Featured Poster
Reputation Points: 550
Solved Threads: 728
Bite my shiny metal ass!
pritaeas is offline Offline
4,166 posts
since Jul 2006
Jul 2nd, 2009
0

Re: Database - CPanel

Ok I see where to select the type to be Varbinary, but, how do I actually get an image in there?? Hehe.

Also ok umm. Well. At least to my knowledge the page doesn't really change but tell me if I am wrong and if it is possible to do what I want to do. I want when the main page loads it says something, like, explaining what the page is for. Then when you click on something, that text changes into the information that you clicked on. Small visual go to http://www.wowtah.com/achievements.php#main. Right now the data in there is what I chose to test with using your help. But, when the person first visits that page say in place of that data it's explaining what achievements are. Then when you click on the links off to the left (General, Quests, Exploration, all those) that data changes and shows you the achievements in that category. Is this possible? I mean, if I had to put each category on a new page then I don't understand the point in using a database for this. I thought to use one so that I didn't have to make a page for each one.

An example of something I am trying to achieve is go here: http://www.wowhead.com/?npcs=1 you will see it says npcs=1 in the url at the top yes? Well if you hover over the NPCs link that is above the shown data, (Database>NPCS>Beasts) You can select something other than Beasts by going to NPCs in the drop menu and clicking Critters. Now in the url shows instead of npcs=1 it shows npcs=8. The rest of the page did not change. Just the data inside it. Perhaps this is a different concept than what I am trying to achieve, though, eventually I will need to do this because I am going to store that sort of searchable data as well.

I hope I've made it clear what I am trying to do. I don't know a whole lot about how databases work so, thats why it's a little hard to explain haha.

Also I just tried creating a new table to test the Varbinary type field and, wasn't able to create it. Got error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL) ENGINE = MyISAM' at line 1. But I think it could be just cuz I am not filling in the other fields correctly. Like heres the SQL it showed for the fields I filled:

sql Syntax (Toggle Plain Text)
  1. CREATE TABLE `wowtahc1_achievements`.`test` (
  2. `Images` VARBINARY NOT NULL
  3. ) ENGINE = MYISAM

Is there something I need to put in the others like the Length/Values, Collation or Attributes?
Last edited by peter_budo; Jul 6th, 2009 at 11:06 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Light Poster
Spunky is offline Offline
34 posts
since Jun 2009
Jul 3rd, 2009
0

Re: Database - CPanel

Ok I actually did a bit of research. I added 255 to the length like I would for a VARCHAR field and got it to create. But how do I get an image in it when I try to insert data?
Reputation Points: 10
Solved Threads: 0
Light Poster
Spunky is offline Offline
34 posts
since Jun 2009
Jul 5th, 2009
-1

Re: Database - CPanel

Sponsor
Featured Poster
Reputation Points: 550
Solved Threads: 728
Bite my shiny metal ass!
pritaeas is offline Offline
4,166 posts
since Jul 2006
Jul 5th, 2009
0

Re: Database - CPanel

You know. I've really appreciated your help up until here but that link was just a disappointmet.

1.) Have I not made it clear I don't know the coding yet for PHP? That link brought me to people discussing code and how to fix or add to the code. I noticed the dude used XAMPP which, I tried using to make a server on my computer but failed so instead bought a host that did it for me.

2.) I need to know how to do this through CPanel if possible and with as little self coding as possible. Obviously if I need to code I need to code, I am willing to learn. But I can't look at that post you linked and learn.

The guy on that post and I may have a similar issue but we are both on different levels of the issue and knowledge. I understand I may need more knowledge, but I don't know it yet till I know how to do what.

Do you know how to use CPanel? Cuz really that's what I came on this forum for, to find someone that knows CPanel that can help me out.
Reputation Points: 10
Solved Threads: 0
Light Poster
Spunky is offline Offline
34 posts
since Jun 2009
Jul 6th, 2009
0

Re: Database - CPanel

Probably misunderstood, possibly because english is not my native language, but I'm trying. Uploading an image through phpMyAdmin (in cpanel) can be done by using the choose file button, when you insert a new record. this works on varbinary and blob fields.
Last edited by pritaeas; Jul 6th, 2009 at 6:39 am.
Sponsor
Featured Poster
Reputation Points: 550
Solved Threads: 728
Bite my shiny metal ass!
pritaeas is offline Offline
4,166 posts
since Jul 2006
Jul 6th, 2009
0

Re: Database - CPanel

Oh and sorry for coming off harsh. Hadn't realized you english isn't the best. It's alright you misunderstood.

I hadn't seen a choose file button when I looked before and I just looked again now that I know to look for one and still don't see anything. Where is it located? I am inserting a new field into the table that has a Varbinary field. I can change the function and type in the value field, but that is all I see.
Last edited by Spunky; Jul 6th, 2009 at 12:36 pm.
Reputation Points: 10
Solved Threads: 0
Light Poster
Spunky is offline Offline
34 posts
since Jun 2009
Jul 7th, 2009
1

Re: Database - CPanel

Doesnt matter. I can understand your frustration. Create a table containing a blob field (not varbinary, my mistake). Then you can insert data in the table. I made a screenshot so you can see:

http://pritaeas.info/DaniWeb/Screens...baseCPanel.png
Last edited by pritaeas; Jul 7th, 2009 at 5:50 am.
Sponsor
Featured Poster
Reputation Points: 550
Solved Threads: 728
Bite my shiny metal ass!
pritaeas is offline Offline
4,166 posts
since Jul 2006
Jul 7th, 2009
0

Re: Database - CPanel

Omg thank you!! You are so helpful! Thank you so much!

Ok so now I still need to know how to change my data when a link is clicked on. I'm sure you haven't answered that because I'm probably still confusing.

Go to http://www.wowtah.com/achievements This is my website; particularily the page I am specifically working on. See those yellow words off to the left? Those are the different categories of the different achievements you can aquire. The data in the middle currently is just the test data I put there with your help. Eventually I will make it so it introduces you to what achievements are and blah blah blah but then when you click on one of the categories it will list those achievements.

What I am trying to accomplish is like on http://wowhead.com they have a huge database of stuff you can sift through. And no matter what you click on the rest of the page stays the same. As if only the data is changing. Or am I wrong? Is everything else perhaps in a template that is used over and over again? My site is created with a template ofcourse. But, with a database, how do I have people search through it then like on wowhead without having a new page for each thing they search for? I notice that the url changes only slightly at the top, like the number at the end when you search. Just like on this website, everything stays the same except the post number.

Do you see what I mean? I am doing my best to explain lol. I guess I am just not all that familiar with how websites go about having their databases searched within. I'm still new to this.

I guess wowhead also has their data organized in a different way than I am trying to do. More in lists. But I am sure that's all customizable. I just need to know how its done first..I dont know how else to explain what I am trying to do. If you dont understand exactly, ask any questions that may help.
Last edited by Spunky; Jul 7th, 2009 at 1:12 pm.
Reputation Points: 10
Solved Threads: 0
Light Poster
Spunky is offline Offline
34 posts
since Jun 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Database Newbie
Next Thread in Database Design Forum Timeline: ERD for social networking website





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC