Jump to content

This Day in History database retrieval


twebman

Recommended Posts

I have a "This Day in Baseball History" database. The fields are:

id, content, day, month, year

The content field holds the descrip of what happened that day. The other fields are self-explanatory. I want to add a field that will tag each event to a certain team, so I can display the results to have a "this Day in Tigers History" page and "Yankees" and so on... Some events might be fit more than one team. How can I create a field that has an identifier for both teams? For example, if it's an event I want to have on both the Tigers and Yankees pages, can I put "DET" and "NYY" in one field separated by a space? How do I retrieve it? I've tried LIKE and CONTAINS and neither works. Is there a way to do it that I'm overlooking?

Any help is appreciated.
Link to comment
https://forums.phpfreaks.com/topic/18231-this-day-in-history-database-retrieval/
Share on other sites

I'm sure this isn't the BEST way of doing this, but you COULD create a couple "search" fields like keyword1 keyword2 keyword3, then "this day" would have to do with keyword 1 = giants keyword 2 = yankees..etc...

This would be a work around until someone who knows what they're talking about replies.

-theblain
Would using javascript be a problem, you could have the 404 page redirect to the page you want, by adding the .html at the end of it. What I mean is get the url.


<SCRIPT LANGUAGE="JavaScript">

window.location="http://www.yourdomain.com<?php print $_SERVER['REDIRECT_URL']; ?>.html";
</script>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.