Jump to content

JonathanAnon

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JonathanAnon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah that sounds like the best, didnt think about that. thanks.
  2. Working on a housing database, eight text fields (i.e. easy) and 6 images required for each record. I've read through a lot of posts here before and the general opinion is to upload the file to a folder and then include a text field in the database to give the path to the file (as opposed to using a BLOB and uploading the image directly to the database). I have my code prepared to do this BUT - what way should I handle the folders, should I create a folder for each record, should I just have all the images in one folder... what's the best practice on this?
  3. Hi I have a piece of SQL code to pull out records that are only one year old $sql= "SELECT * FROM projects WHERE DATE_SUB(CURDATE(),INTERVAL 365 DAY) <= '$currentdate';"; But how do I get records that are older than one year ?? I have tried the opposite sign but it will not work. regards, Jonathan.
  4. i have a webpage set up for secure socket layer. I know want to tighten it down by using a password. I use to use just a login and then set a cookie to say that the user had logged in, then have an isset function on the start of each page. Is this still the best way to do things or should I use some other method?
  5. What are you trying to do. Are you trying to update all of the fields - is it not just one record that you want to update. $query = "UPDATE content SET Content = '$id_row'"; I'm from ireland as well by the way - where is your GAA team based?
  6. Hi, i pull a timestamp from my mysql database and it is formatted as yyyy-mm-dd hh:mm:ss automatically. How can I convert this to yyyymmddhhmmss easily? regards, J
  7. Hi and thanks for your response. Like I said I have seen queries on the net that ORDER BY score. I have also read that the MySQL does not automatically order by relevance itself. I'll look at it again. thanks, J
  8. [!--quoteo(post=357819:date=Mar 24 2006, 01:34 AM:name=D1proball)--][div class=\'quotetop\']QUOTE(D1proball @ Mar 24 2006, 01:34 AM) [snapback]357819[/snapback][/div][div class=\'quotemain\'][!--quotec--] if you press search it works for the first query so i know its connecting, but for some reason it wont list the other results when you click another page. [/quote] are you sure that you are passing the correct variables to the second page. You have to pass them again as either POST or GET varibles.
  9. Hi Joe, this is not really a PHP question, I think it is more of a HTML question as this will basically be the language used to call the image. I've seen sites where the right click has been disabled. I'm sure if you google "disable right click browser" you will get something. but bear in mind the user will always be able to do an Alt-prt src and copy an image of the whole browser to the windows clipboard. regards, J
  10. Hi, there's a lot of code there. Can I suggest two things first. 1. echo out the SQL statement before the query is run. See that the all the variables are being passed and that the query is being created correctly. You could us phpmyadmin to run this sql statement on the database and make sure that there is not any syntax errors with it. 2. make sure that the connect.php file is okay. also, I use: include('connect.php'); as the code for my includes. I'm not sure if you're way works aswell. It may do but test it out. Maybe include an echo statement in the connect file to say "opened file" or something like that.
  11. Hi I have a fulltext search that does not sort by the best score. I have read that this is the default but how do I sort it this way. I have added the ORDER by score part to the sql statement but it still does not work. It does not recognise the word score.
  12. Hi, I have just got a dedicated server for my online directory. I have changed the ft_min_word_len to a value of 2, have rebooted the server and have checked the "Show variables like 'ft_min_word_len';" and this returns a value of 2. I have also reindexed the records. When I run MySQL (through Putty), select * from businesses WHERE (MATCH (businessname, keywords) AGAINST('car')); this returns 10 records. But when I use the exact same query using, include('opendb.php'); $sql = "select * from businesses WHERE (MATCH (businessname, keywords) AGAINST('car'))"; $result=mysql_query($sql,$db); $num=mysql_num_rows($result); etc etc. it returns nothing. I know there is nothing wrong with the code as the same code using a searchstring of four or more characters it works fine. It just seems that the mysql_query statement does not work on less than four characters even though I have changed it.. Has anyone got any ideas as this is driving me mad. thanks J
×
×
  • 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.