Jump to content

yarub

Members
  • Posts

    72
  • Joined

  • Last visited

About yarub

  • Birthday 08/06/1985

Contact Methods

  • AIM
    evenmonk3ys
  • MSN
    aanders@usd.edu
  • Website URL
    http://webmnky.com

Profile Information

  • Gender
    Male
  • Location
    Sioux City, IA

yarub's Achievements

Member

Member (2/5)

0

Reputation

  1. First off, I'm not trying to "join" the tables like every single website is trying to tell me to do. And if I am.. it's not working. I am trying to take two different types of "post" style tables and put them into one readers column and have them sort by date. For instance.. Table 1 Post IDPost TitlePost ContentPost Date 1Title 1Content 120111018 2Title 2Content 220111019 3Title 3Content 320111020 Table 2 Post IDPost TitlePost ContentPost Date 1Blog 1Context 120111015 2Blog 2Context 220111018 3Blog 3Context 320111020 How can I query those in the manner that they would display something like.. 1, Blog 1, Context 1, 20111015 1, Title 1, Content 1, 20111018 2, Blog 2, Context 2, 20111018 2, Title 2, Content 2, 20111019 3, Title 3, Content 3, 20111020 3, Blog 3, Context 3, 20111020 Note that it's sorted by date. When joining tables, it wants me to compare the two tables. I don't want to do that. If someone can help me, I'd greatly appreciate it.
  2. I wasn't sure how to post this.. or how to even break it down. Basically, I'm having problems with something and I have no idea where to look or how to fix it. I've been using AppServ to handle everything on my localhost for years now and I'm having a weird problem out of nowhere. When I go to login to phpMyAdmin, it lets me put my username and password in. When it goes to refresh the page to let me in, my entire computer restarts. I reinstalled AppServ and it didn't fix anything. To be honest.. I have no idea where to look. Any ideas where to send me? =\
  3. You rock! Thank you. Learned something new.
  4. I was messing around with different array functions, but I couldn't find the one that does what I want it to do. I don't know which function to use that will store it. Can you point me in the right direction? My database pretty much looks like this: [rowid1] [field] [value] [rowid2] [field] [value] [rowid3] [field] [value] [rowid4] [field] [value] [rowid5] [field] [value] I want to be able to output the field and value from any row at any time.
  5. I don't even know what I'm trying to do.. but I can't figure out how to do it.. or how I should do it. I have a table with a bunch of rows in it.. let's say 10 rows. I want to output two fields from each one of those rows wherever I want on my page. So if I do it this way, I can't use: while($result = mysql_fetch_array($query)){ I can't use that because that assumes I want to repeat each line. However, I don't want to use a new query each time because the actual number I'll be using is closer to 100. So if that makes sense.. does anyone have any ideas?
  6. I couldn't figure out where to put this.. and I'm not coming up with what I want via Google... so I decided to post here. I'm trying to figure out a way I can enter in a few copyright lines into quite a few pages without manually doing it. Like if you open each individual file, I want there to be a property notice at the top of each one. Does anyone know of a program that will automatically add it in? Thanks!
  7. No no. Thorpe got me exactly what I wanted. I defined $variable elsewhere in a config script and I actually placed $variable into the content field in my database. Now when I write posts on my main page, I can call $variable instead of writing everything out. For instance, if I changed the name of my website, every post changes. Probably a bad way of doing it, but it's just a quick project. Thank you!
  8. I have a database with a table. In this table, I have a field for content. In this field.. I would like to be able to type $variable for instance and it know what I'm referring to. I have $variable designed earlier as "hamburger" and I would like it to pull up hamburger when I call for it through a mysql_fetch_array. So saved into the database is "$variable" and not hamburger. But I would like it to say hamburger when it prints out. Can anyone help me?
  9. Who knows.. maybe it's not really that complicating. But it's driving me insane. And I don't even know what to search to find the answer. I am putting together a tournament / gaming bracket for a game we're playing at work. Basically, it shows all of the teams in a list. Here's what I want to do. This is how I have it now. It will ultimately list out all of the teams with a checkbox next to them. [ ] Team 1 [x] Team 2 [ ] Team 3 [x] Team 4 [x] Team 5 I have selected Team 2, Team 4, and Team 5 to play in the match. This is what I want to do and I don't know how to do it. How could I then create three rows into a new table with this information? INSERT INTO table (teamid, team, etc, etc, etc) VALUES ('2', 'Team 2', '', '' ,''); INSERT INTO table (teamid, team, etc, etc, etc) VALUES ('4', 'Team 4', '', '' ,''); INSERT INTO table (teamid, team, etc, etc, etc) VALUES ('5', 'Team 5', '', '' ,''); That's what I want it to do. That should be really simple. But I don't know what to do to get it to print out three of them. I can do one obviously with a post form. But from there, I get lost. And it's not always three rows. So how do I declare that? Please help me. ^^;
  10. So I can't find anything that really does what I want it to do. I have a blog that I made. I'm trying to keep my home page rather short, but want to give them the option of expanding the entry without changing pages. So what I'm doing is using the "read more" link with css to change its display (display:none;). I have that part working though! I click "Read More" and it shows the rest of my entry. I click "View Less" and it hides it. $showcount = 500; $hidecount = $charcount - $showcount; $content_show = substr($post['content'], 0, $showcount); $content_hide = substr($post['content'], $showcount, $hidecount); My problem. I'm using the above code to pull the part that always shows and the part that's temporarily hidden. But sometimes.. it cuts off letters mid-word. Like.. Hello! My name is Austin. Ni[hidden]ce to meet you![/hidden] How can I prevent that? Edit: Or better yet.. is there a way I can make it so it does the split after three paragraphs or something?
  11. That's not going to work though because it's not going to place the fields in the right area. I need it to be able to put four in each list, then break off into another set of four.. then another. And so on. <div class='details'> <ul class='categories'> <li><a href='#' class='nav_categories'>Category 1</a></li> <li><a href='#' class='nav_categories'>Category 2</a></li> <li><a href='#' class='nav_categories'>Category 3</a></li> <li><a href='#' class='nav_categories'>Category 4</a></li> </ul> </div> <div class='details'> <ul class='categories'> <li><a href='#' class='nav_categories'>Category 5</a></li> <li><a href='#' class='nav_categories'>Category 6</a></li> <li><a href='#' class='nav_categories'>Category 7</a></li> <li><a href='#' class='nav_categories'>Category 8</a></li> </ul> </div> <div class='details'> <ul class='categories'> <li><a href='#' class='nav_categories'>Category 9</a></li> <li><a href='#' class='nav_categories'>Category 10</a></li> <li><a href='#' class='nav_categories'>Category 11</a></li> </ul> </div> It could look like that. So it's not simply done with one while query thinger.. Takes more than that. =\
  12. Couldn't think of a good name for a subject. Oh well. What I'm trying to do is print out a list of categories.. but it would almost require a query within a query to do this.. and I can't figure it out. I'm goin nuts. Here's what it looks like... <div class='details'> <ul class='categories'> <li><a href='#' class='nav_categories'>Category 1</a></li> <li><a href='#' class='nav_categories'>Category 2</a></li> <li><a href='#' class='nav_categories'>Category 3</a></li> </ul> </div> <div class='details'> <ul class='categories'> <li><a href='#' class='nav_categories'>Category 4</a></li> <li><a href='#' class='nav_categories'>Category 5</a></li> <li><a href='#' class='nav_categories'>Category 6</a></li> </ul> </div> How can I get it to print out so that each "Category" is a separate row from the database. Thanks.
×
×
  • 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.