Jump to content

mre2mpo

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mre2mpo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Are you sure the mysql servername is localhost and the username, password and database name are correct. Your sql dose not look like its wrong unless you don\'t have that table or field. Are you trying to connect from a different webserver to the same mysql server if so it will not be localhost (or the new server might not be localhost) my hosting company uses it servers IP address (not localhost)
  2. The problem is I have a database table that keeps track of people who are online (how have been active in the last 5 mins). A php script is run when ever they click a link on the page and it inserts the user into the database and delete all entrys that are over 5 minutes old. The problem occurs when two users click on a link at almost the same time. This runs the script but only one of them is entered in the database the other is shown a defined error message \"Error inserting into database\". Any ideas how I can get round this problem. I would really like know a fix for this problem as it will be helpful for a later day but is there a better way of find out who is online. Michael
  3. I want to select all the records from a database and then display the first 10 of one page then at the bottom of that page I want a number of links to display the next 10 records eg page to look like Record 1 Record2 Record 3 ect....... next page 1.2.3.4.5.6.7 I know a way of doing it but I am sure there is a better way any suggesting would be very much appreciated. Michael
  4. I have fixed the problem if anyone else has the same problem then the code is $query = \"select * from user where county = $countyid order by nearestcity = $nearestcityid DESC;
  5. sorry the last bit should not be $countyname but $cityname
  6. I have a query where I want to search for users from a county but there is also a nearestcity field. What I want to do is select a nearestcity and display these first and then display the rest of the users from that county. I am not quite sure how do it. $query = \"select * from users where county = $countyname ?????then wat do I need to do with $countyname. Michael
×
×
  • 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.