Jump to content

markmuir

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by markmuir

  1. markmuir

    Searching

    Major problem here!! I have got two tables within my database called "registration" and "activity". Within both tables is a field called MemNo.  What I'm wanting to do is query the registration table for a certain town and a certain day that I type in. I then want display the users Name, Address and MemNo from the Registration table but I want to leave out users that have already completed an activity. Hope everyone understands my explanation. Thanks
  2. It's ok guys, finally got it. Thanks ronverdonk for the code
  3. For example, when I run a query searching for users who's internet has been filtered, I would like to display a table with the users name & address (have already done this) and at the bottom, display the total percentage of users that has their internet filtered. Does this make any more sense?
  4. I'm asking how to work out the percentage and display the result
  5. Hey, I would like to display a percentage of a query on my query results page i.e. display the table of results and then down at the bottom, a line saying "The total percentage is *%",  but have no idea how to?? I am using a MySQL database.  Any ideas??
  6. Hi guys, Having a minor problem here. On my reports page, I want to display the top 5 books that people have chose. In my database, i have 3 fields (Book, School, Hits). Inside my insert.php script, it automatically inserts a number 1 into the hits every time I submit the form. On my reports page, I am able to list the books with the amount of hits they have had but I'm unable get them to display the highest first. [i]insert.php[/i] <? $link = mysql_connect("localhost", "username", "password") or die("Could not connect"); $db = mysql_select_db("database", $link) or die("Could not select database"); $book=$_POST['book']; $school=$_POST['school']; $result=mysql_query("INSERT INTO `books` VALUES ( '$book', '$school', '1') "); ?> [i]reports.php[/i] <? $link = mysql_connect("localhost", "username", "password") or die ('My SQL Error: ' . mysql_error()); $db = mysql_select_db("database"); $result = mysql_query ( "SELECT Book, sum(Hits) FROM `books` GROUP BY 'Book' ") or die("SELECT Error: ".mysql_error()); ?> <? print "<table width=400 border=3>\n"; while ($get_info = mysql_fetch_row($result)){ print "<tr>\n"; foreach ($get_info as $field) print "\t<td><font face=verdana size=3/>$field</font></td>\n"; print "</tr>\n"; } print "</table>\n"; ?>
  7. Could you tell me how this is done please?? Still in the process of learning Thanks for your help
  8. The onBlur function looks as though it could work but is it possible to enter MySql commands within the function?? Or is there any other way I can get it to connect to a mysql database to check to see if the membership number has already been entered after the user has clicked out of the input box?
  9. Hi, in serious need of help. I have a registration form that adds users to a MySQL database. What i'm wanting to do is:> When you enter the users membership number and then attempt to go to the next field, I want to connect to a MySQL database and check to see if the membership number has been entered and if so, display a pop up box telling me so instead of waiting to type all the information and when I press enter, it tells me then as it can be so time consuming. Can this be done?? Any help at all would be greatly appreciated Thanks
×
×
  • 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.