Jump to content

Sweets287

Members
  • Posts

    17
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Sweets287's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi All!! I have some php script in a program I use and I'm struggling to change it. It works fine Getting the personId for any details less than 1 day old, but I want to change it to any details less than 1 hour old. I've tried changing DATEADD(d,-1,getdate()) to DATEADD(h,-1,getdate()) and googling other things but still stumped Any Ideas? select PersonId dReceievedDate = cast(YEAR(dReceievedDate) as varchar(4))+'-'+ RIGHT(CAST(MONTH(dReceievedDate) as varchar(2)),2)+'-'+ RIGHT(CAST(DAY(dReceievedDate) as varchar(2)),2) from peopletbl where dReceievedDate >DATEADD(d,-1,getdate()) order by PersonId DESC
  2. I think I've figured that I need to keep the top of the tower in a seperate Drop Div, that should keep it on top. But I'm still struggling to limit the Div to one droppable element in it?
  3. I've been playing with some new Drag and Drop code. Pretty simple stuff but what I am after is setting some rules for it. What I'm try to build is a tower where people can put different levels on the tower and choose different tops. Hard bit I'm struggling with is keeping the tower top at the top of the pile and replacing it when a different top is drag over it. Can anyone shed some light? Cheers!
  4. Hi all, I've been trying to build a php instant search and using an xml file to show 10 items matching items, all works fine but the xml file has over 5000 titles and urls in it so it takes about 10 seconds to show any results. Does any one know how i can speed things up? The bit of code i'm using -> <?php $xmlDoc=new DOMDocument(); $xmlDoc->load("links.xml"); $x=$xmlDoc->getElementsByTagName('link'); //get the q parameter from URL $q=$_GET["q"]; //lookup all links from the xml file if length of q>0 if (strlen($q)>0) { $hint=""; for($i=0; $i<($x->length); $i++) { $y=$x->item($i)->getElementsByTagName('title'); $z=$x->item($i)->getElementsByTagName('url'); $limit = 10; if ($y->item(0)->nodeType==1) { //find a link matching the search text if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q)) { if ($hint=="") { $hint="<a href='" . $z->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . $y->item(0)->childNodes->item(0)->nodeValue . "</a>"; } else { if($counter <= $limit) { $hint=$hint . "<br /><a href='" . $z->item(0)->childNodes->item(0)->nodeValue . "' target='_blank'>" . $y->item(0)->childNodes->item(0)->nodeValue . "</a>"; $counter++; }} } } } } // Set output to "no suggestion" if no hint were found // or to the correct values if ($hint=="") { $response="no suggestion"; } else { $response=$hint; } //output the response echo $response; ?> Cheers all
  5. I'm sure I've read about this a few years ago but can't find any info on it now. Is it possible to update the records in a database purely through a single e-mail. ie sending a email to the database somehow and using the text or an attachment in the email to update the records. Cheers for any help!
  6. This might seem simple but i'm struggling a bit. I've got a page in a sub folder of my website and it links to a page in the folder above it, but it keeps trying to reference within the same folder. I'm Trying to do this <a href=\"http:\\www.mywebsite.co.uk\">Click Here</a> But is linking to www.mywebsite.co.uk/myfolder/www.mywebsite.co.uk Any ideas?
  7. for the keywords of my site I pull the information from my database, but i'm struggling to spilt field down into seperate words, so that each word is a keyword as well as a key phrase. It works fine but except for it only uses the last word from the phrase. Any ideas? $string = $title_name; $split_title = explode(" ",$string); foreach ($split_title as $subtitle) { $meta_keywords = ' '.$name .', '.$title_name.', '.$cat1. ', '.$cat2. ', '.$subtitle. ', '.$name.' '.$subtitle.', '.$cat1. ' '.$subtitle. '; }
  8. I want to display 3 different images in one space, changing every 5 seconds. I can do this with a animated GIF looping putting the images into one file, but the problem is I want each image to link to a different page. I'm sure its possible but I don't know how, any help?
  9. I'm really familiar with javascript, do you happen to know where the code i need may be listed?
  10. I want to display 3 different images in one space, changing every 5 seconds. I can do this with a animated GIF looping putting the images into one file, but the problem is I want each image to link to a different page. I'm sure its possible but I don't know how, any help?
  11. its not really links i'm looking at, its the alternative addresses like www.youraddress.co.uk - www.youraddress.com all which point to the same address. Curious if there is a search to show all the direct addresses pointing to a site
  12. Don't know if this is possible, but is there anyway to find out what web addresses point to a certain website?
  13. Help, read previous posts but still can't connect to the database, using a php file on an include to connect and then selecting what I need on pages afterwards. But comes up with the following error msg -Fatal error: Call to undefined function mysql_connect()
  14. I have a header and a menu down the left setup by an include on my website. And a table with various text and images between them. Is there any way where I can keep the header and menu in the same place while I use the browser scroll bar to scroll down the text and images, I can put an extra scroll bar in the table but it looks awful with two scroll bars. Any Ideas?
×
×
  • 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.