Jump to content

PTS

Members
  • Posts

    16
  • Joined

  • Last visited

About PTS

  • Birthday 12/23/1980

Profile Information

  • Gender
    Male
  • Location
    Buffalo, NY

PTS's Achievements

Member

Member (2/5)

0

Reputation

  1. requinix: Thanks, that makes total sense but that would require a complete overhaul of the complex form I am working with. There's actually far more going on with this form then just the fields and tables I mentioned. That said, short of an easier to implement solution, this seems like a good direction to go.
  2. I have an issue that is way above my database comfort level. Here are two tables I'm working with: signoff > signoff_id > signoff_employee > signoff_supervisor > signoff_files files > file_id > file_name When inserting data into the signoff table, the 'signoff_files' field includes multiple values separated by a comma that correspond to the 'file_id' field in the files table. So if I select the signoff table, I would get something like: "1" , "Employee Name" , "Supervisor Name" , "10001, 10003, 10010"; "2" , "Employee Name" , "Supervisor Name" , "10001"; "3" , "Employee Name" , "Supervisor Name" , "10003, 10010, 10015"; Is there any way to replace the values in the 'signoff_files' field with the 'file_name' each value corresponds to? I have no problem using a LEFT JOIN when there is only one 'file_id' value in the 'signoff_files' field, but I don't know what options I have in MySQL to do it for multiple values. Any help or guidance would be greatly appreciated. Thanks, Paul
  3. THANK YOU! You are a life saver. I was messing around with the RewriteRule seven ways to Sunday. I never knew you needed these two lines for it to work: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d I tested out a variety of inputs and all the ones that failed before are working correctly now.
  4. Was hoping someone might be able to help me with a rewrite issue I'm having. I would like for my clients to control the URL of any page they create in our custom CMS. Let's say my client creates three pages in our CMS and enters the following values for the FURL field: 1. "services/design.php" 2. "products/software/1/" 3. "news" I would like for the following URLs to work based on those FURL field entries: 1. http://www.domain.com/services/design.php 2. http://www.domain.com/products/software/1/ 3. http://www.domain.com/news Basically, I'd like for them to control whatever the URL is after "http://www.domain.com/". Is this possible? I've tried various methods and all have failed. The dynamic link is: http://www.domain.com/content.php?furl=page-link-here Hope someone might be able to help me out. Thanks!
  5. I run a sports team website that's heavily data drive. Two of my many tables are a "roster" table and a "news" table. One of the fields in the "news" table is playerRefID. If a particular "news" story is heavily about a player, I mark that field with the player's ID number from the "roster" table. I have no problem displaying news on just one particular player but I do have a problem if a story is about more than one players. The playersRefID field is a varchar field with numbers separate by commas if the "news" is about more than one player. For example, if a news story is about Player #11, Player #21 and Player #23, then in the news table, that playersRefID field would be '11,21,23' What statement would I use to SELECT if a particular player's ID is in that comma-separated "array"? If there even an option for this? If there a better option I should use? Thanks in advance!
  6. I have a fully working PHP management system with dozens of fields, let's call it Page A. In the form of Page A, the user has to assign a date to one of the text fields but dates are limited to only a few specific dates. So I created a new page (call it Page B) which displays the specific dates that are available (based on another database output). On the form I have a link that pops open Page B. I want the user to be able to select an available date (link) and once they do that, the value of that date goes into the text field in Page A and closes pop up window Page B. Anyone have an recommendations or a link a site with an example? I googled it but I just don't know what to look for so all my attempts came up empty handed. Thanks in advance!
  7. Hey, this is probably an easy answer that I should know but I completely forgot. How do you display the number of times a particular entry appears in a column of a database? Thanks in advance.
  8. Hey everyone, I'm stuck with a project I'm working on. I have database which collects a lot of information. However, for the sake of ease, lets say the database consists of five fields. 1. status (dropdown) 2. action1 (text field) 3. action2 (text field) 4. action3 (text field) 5. action4 (text field) When I update a row of data via a form I have, I want the dropdown status field to be updated depending on whether or not the other text fields are filled in. For example, if text field 1 is filled in, I what the status drop down menu change to 1, If status 2 is filled in, the drop down would be moved to 2. And so on. I don't want the user to have to change the drop down menu himself, I'm trying to see if this can be done on the fly if this can be done on the fly. The only other note of importance would be the user would never fill in "action4" field without all the other "action" fields below being already filled in and locked out. So if action1 is already filled in when a user is updating, the user can only update "action2". Hopefully that makes some sense.
  9. http://www.letsgosabres.com/playoffs/yahoo.html I have been working on this all night and can't figure it out. The links work fine in Firefox but you can't click them in IE. I stripped out all the extra coding and have the very bones of the page. How can I get that link to work in IE? Any help or direction would be greatly appreciated.
  10. Thank you sir! I figured it out but your way is 10x easier than what I came up with! It worked like a charm.
  11. I'm trying to figure how to make multiple replacements in a string before echoing the string out. str_replace('Chris Drury', '<a href="/profile.php?playerid=23">Chris Drury</a>', $fullstory); The above code does what I need it to do but just for one player. I want to find a way to make it happen for about 30 players. Is there a way to do this in PHP? Thanks in advance for any advice or direction.
  12. I have Invision Power Board on my site. My regular site also has a news engine for which I created a custom comments system that allows our readers to post their comments into. I only want people who are registered on our forums to have the ability to post comments. Is there a way I can use my IPB memberlist to make this happen? Has anyone seen any good solutions or alternatives to make this happen?
  13. nm this post. I figure out an additional question I had listed here.
  14. I have two tables created in my database: "news" and "newsviewed" news is our news engine for posting stories to our site and newsviewed is a new table we created to track how many times a story is viewed so we can offer our visitors features like favorite stories, most viewed, etc. Each time a visitor loads a story on our site (/fullstory.php?newsid=####), I want to create a row in the newsviewed table that automatically inserts a row of data (id, newsid, timestamp). Is there a php statement that I can do to make this happen automatically each time a story is loaded? Any guidance or direction would be greatly appreciated. Also, is this an efficient way of doing this? I know I could add a field to the news table called counter and then update that field to go up by one but I want to have the ability to show most popular stories by date.
  15. Thanks. I never thought it would be so simple. I gotta get myself to learn more about sessions. I did the following to get the number back down to 1 after it hits 5. session_start(); if (isset($_SESSION['viewing'])) $_SESSION['viewing']++; // add one else $_SESSION['viewing'] = 1; // start of the viewing if ($_SESSION['viewing'] >= 5) {$_SESSION['viewing'] = 0;} echo $_SESSION['viewing']; Is this the best way to do it? Seems to do the trick for what I'm looking for.
×
×
  • 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.