Jump to content

bagnallc

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Everything posted by bagnallc

  1. hi i have a page with a form on, which has several variables associated with it. when the submit button is clicked it takes you to another page which uses the set variables. i am using isset to establish whether they are set or not. i was wondering though, if there is a function which lists all variables that are set? thanks
  2. i have just done a slight restructure on the tables and also ran a few optimize and analyze statements. part of my problem may have been that some tables were myisam and others innodb. anyway for now i wont take up any more of your time as it seems to have resolved problems many thanks once again for showing an interest cheers
  3. Hi guys, thanks for your help. certainly some of the queries i run (such as the one in the slowlog listed below), are indeed very large ones, but whats troubling me is that in the past this query and many others would run no problem. it is still the case now that when i initially log in at first, or if i reboot - the pages load instantly. just once in a while the pc starts to hang and when i go in to task manager i see this mysqld-nt.exe with cpu usage very high. rest of the time its as normal i guess it does look like it may be the large queries,its just confusing because as i say, previously there was never the same problem. anyway in the hope you may be able to suggest something the slow log file is as follows C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt, Version: 5.0.19-nt-log. started with: TCP Port: 3306, Named Pipe: (null) Time                 Id Command    Argument # Time: 060725 17:22:59 # User@Host: root[root] @ localhost [127.0.0.1] # Query_time: 81  Lock_time: 0  Rows_sent: 2  Rows_examined: 1868379 use horse; SELECT distinct ifnull(rt_1.rt_1_id, 2) as id, ifnull(rt_1.rt_1_description, 'Non Hand') as rt1 FROM numbers LEFT JOIN rt_1 ON numbers.rt1_id=rt_1.rt_1_id JOIN all_details ON numbers.no_id=all_details.no_id
  4. i am having a bit of a problem at the moment with my pc. i have been designing a website just using localhost (php/mysql written in notepad) and i have never had any problems with it. as i have done each step i have always being testing and viewing as i go along. now though all of a sudden whenever i click a link or try and load a page with any database content (even pages which always worked fine), my pc just hangs and when i go into task manager mysqld-nt.exe is always a high number. are there any settings i need to change or is there something that may have gone amiss? many thanks
  5. hi i am following these instructions from the phpmyadmin advice pages but when i restart apache my changes are not being taken into account. [i]The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize. [/i] i am trying to make a copy of a mysql database but am continually faced with the dreaded Max: 2,048KB message in the import screen. i have adjusted settings and these are now saved in the php.ini file but as i say nothing changes can anyone help me - this is all being done on my localhost, in case that is of relevance
  6. thanks for reply. i did actually try that but it still hung. i have just changed my form to a dropdown box and its an immediate response now! i dont really understand why but once it works im happy! thanks again for your advice though
  7. hi when i run the following query on mysql database it is very fast (immediate) SELECT id, name from names WHERE MATCH(name) AGAINST ('whatever*' IN BOOLEAN MODE) but when i use it in a page with php it is hanging (although does eventually return as expected) is there a better way of writing the code? here is code <?php require("connectmysql.php"); $search=$_GET["name"]; $data= "%".$search."%"; if(isset($search)) { $qry= mysql_query("SELECT id, name from names WHERE MATCH(name) AGAINST ('$search*' IN BOOLEAN MODE)"); } if (isset($qry)) { echo "Here are the results:<br><br>"; echo "<form>"; echo "<table align=center border=1><tr><th align=center bgcolor=#00FFFF></th></tr>"; while($checkbox=mysql_fetch_array($qry)) { echo "<tr><td><input type='checkbox' name='name[]' value=$checkbox[id]>" . " " . $checkbox[name] . "</td></tr>" ; } echo "</table><input type='submit' value='GO!'></form>"; } ?>
  8. hi there i am using a mysql query and presenting results in a table. it returns named values and null (which i do want to include). i want to apply a name to the null values in my table - is this possible so for example now it reads value 1 - checkbox value2 - checkbox value 3 - checkbox blank space (for null values) - checkbox but i would like to change it so that its value 1 - checkbox value2 - checkbox value 3 - checkbox "no defined value" - checkbox here is the code <form name="class_form" action="wizard.php" method="get"> <?php //get data for class checkboxes and display them $classqry2=mysql_query("SELECT distinct class.class_id as classid, class.class AS classname FROM numbers LEFT JOIN class ON numbers.class_id=class.class_id ORDER BY classid"); while($checkbox=mysql_fetch_array($classqry2)) { echo "<input type='checkbox' name='class[]' value=$checkbox[classid]>" . " " . $checkbox[classname] . "<br/>" ; } ?> <input type="submit" value="GO!"> </form>
  9. i now have this working. many thanks for your help
  10. im sorry i dont know what you mean by this. it is currently defined at the top of the page in the first block of php code it works fine when called once but the second time it returns nothing thanks again
  11. Hi hopefully this is an easy answer i have the following variable $trainerqry6=mysql_query("SELECT DISTINCT trainers.trainer_id as trainerid, trainers.trainer AS trainer FROM trainers"); it works fine - but i want to use the same query several times in different places on the page. how do i make the variable accessible more than once Thank you and apologies for the stupid question
  12. I have a very basic form as below on page which when called displays stats <form name="countrystats" action="countrystats.php" method="get"> <?php include("hidden_fields_for_separate_forms.php"); ?> <input type="submit" value="Stats"> </form> For this example it works fine and produces the stats as per the mysql query in the code below <?php require("connectmysql.php"); include("get_set_criteria.php"); $countryqry=mysql_query("SELECT country.country_name as countryname, count(all_details_inc_prev.race_no_id) FROM country JOIN tracks ON country.country_id=tracks.country_id JOIN race_numbers ON tracks.track_id=race_numbers.track_id JOIN all_details_inc_prev ON race_numbers.race_no_id=all_details_inc_prev.race_no_id $nh_flat_aw_join WHERE race_numbers.race_no_id > 0 $nh_flat_aw_where $datesettings $trackid group by countryname; "); if(mysql_num_rows($countryqry) > 0) { echo "<table cellpadding=3 border=1 bgcolor=#66CCCC>"; echo "<tr align=center>"; echo "<th> </th> <th>Qualifiers</th>"; echo "</tr>"; while($row = mysql_fetch_row($countryqry)) { echo "<tr align=center>"; echo "<td>".$row[0]."</td>"; echo "<td>".$row[1]."</td>"; echo "</tr>"; } echo "</table>"; } echo "<br/>"; if(!$countryqry) { die ('<p> Can\'t use query :</p>' . mysql_error()); } ?> What i want though is to alter the "countrystats" form and make it communal to many pages so that when called stats are produced for the relevant page. so if i could tell which page the stats form is being clicked i could have many mysql queries in the one statspage ready to produce depending on where the user came from
  13. Hi I have a page which several forms link to. i want to refer to the page that the user is coming from but as all pages use the same form to get there i am unsure how to do it. is there a function which will name the page which you have directly came from?
  14. managed to fix this now. many thanks for all your help sorry for stupid question
  15. Hi all, i am trying to process a simple checkbox form within a while statement. form works fine but im having trouble naming the range so that selections can be retrieved code is while($checkbox = mysql_fetch_array($qry)) { echo "<input type='checkbox' name='$checkbox[field]'>" . " " . $checkbox[going] . "<br/>" ; } when i try and retrieve name value in page where form sends information i am having problems. can you suggest how to name each checkbox - there could be any number of checkboxes from 1 to 500? many 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.