Jump to content

semtex

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

semtex's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I can't manually copy and paste them, as they're part of a cms I wrote. The user can upload images through the cms. However, i'd like the images to be stored on the domain of his website, and not on the domain where the cms resides. I can't do it manually cause it needs to happen rightaway. Immediately after the user has uploaded his/her image(s).
  2. Is there any field in your table cms_stories where you store the type of story that record identifies with? If no, you should probably do that, then read the field and according to what's in there, change the link. eg field="storytype" if ($storytype == 'sports') {     $link = "../sports/story.php?etc"; } else if ($storytype == 'news') {     $link = "../news/story.php?etc"; } the code is not really fitting your code, but i guess it explains what you need.
  3. I need to move temporary uploaded files (mostly images through a html form) from one domain on a webserver to another domain on the same webserver. What would be the best way to do this? I mean, I could use php's FTP functions, but I guess that would be an overkill? I can't use the full path to the domain, as this is not accepted by my hosting company.
  4. [!--quoteo(post=376020:date=May 22 2006, 01:11 PM:name=spasm37)--][div class=\'quotetop\']QUOTE(spasm37 @ May 22 2006, 01:11 PM) [snapback]376020[/snapback][/div][div class=\'quotemain\'][!--quotec--] I'm trying to script an internal auto refresh. I have information on my site that is gathered from another server, but will only update if I go to the "update.php" file directly. And if I keep the window open, I can just click refresh and then it'll update again. Is there a way for me to not have to keep clicking refresh so it'll automatically do it every 10 min or something. This is a 24/7 statistics script, and I don't want to have to go back and forth multiple times a day so people are getting the latest factual information. [/quote] Why don't you include that update.php file in the header of your site? So, everytime a visitor visits your site, he will automatically have the latest updates.
  5. Thanks Eves! The tables do have a common relationship. They all have a field called "activated_dt", that stores a datetime. I could perfectly use "order by activated_dt desc" to order the updates. Maybe I could use some query to generate the table name? If I have the table name and the ID I guess I know enough? Is there a query or a way to return the table name?
  6. sure the datetime fields are "datetime" and not "date"? is this the mysql_error() message?
  7. I've made a mysql driven website that contains a few sections, such as review, interviews, news etc. Each section has its own table in the database. Each table has different fields of course. Now I wanted my frontpage to show a list of the latest updated items. So the newest items should appear first (whether it's a review, a news item or an interview). What's the best way to do this? I can't use this query as the fields differ for each table: SELECT title, text FROM news, reviews, interviews ORDER BY created_dt DESC
  8. I'm using the xhtml strict doctype: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> [/code] As I'm making a database driven website with PHP and MySQL, there's often special characters appearing in my XHTML that are not validating. I'm thinking of a character like "&" (should be "&amp;") What's the best way to solve this? I mean I can't use php's htmlentities() function on every echoed text, can I?
  9. Why don't you search for the ID of that row? And if it exists, then delete the row?
  10. Hey there. Just to be sure, do you know the mysql fulltext (boolean) search possibility? It can return a score that more or less determines the relevance of the search. It's also quite fast, even on large databases. Here's an excellent tutorial: [a href=\"http://www.phpfreaks.com/tutorials/129/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/129/0.php[/a]
  11. I have this query to do a fulltext search in MySQL, which works fine: $sql = "SELECT ID, title , MATCH(title, text) AGAINST ('" . $keywords . "' IN BOOLEAN MODE) AS score FROM reviews WHERE MATCH(title, text) AGAINST ('" . $keywords . "' IN BOOLEAN MODE) ORDER BY score DESC"; Now I need to do the same, but it should not return rows that have these same keywords in the field "person". So basically it has to return all the rows that have the keywords in the fields "title" or "text", but exclude the rows where the keywords are in the field "person" (as well). Can this be done in one query?
×
×
  • 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.