delete from table :: frames when viewing results

  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

i have combined 2 topics into 1 on this. i would like to know your views and methods on this.

i have a database, i also have a viewdb.php file where i can view the contents of the database. i have been testing it out for a while getting the tweeks sorted out. now i an happy with it i want to delete all the TEST DATA. i stress its test data because we havent implemented it yet for live projects. at the moment there is a 'select * from TABLENAME' do i substitue SELECT with DELETE to get all the data that is in the viewdb.php deleted? basically i would like to know how to delete the records that have amassed over a period of TESTING time.

i have seen that the table is going to be a long one and because its a table the scrolling will be important. i would like to stick frames (or iframes) into the viewdb.php file so that i can scroll the data but not the column headers. how do i go about doing this? at the moment this is the code. the whole database is enclosed by a table:
PHP Code: [ Select ]
echo "<table border=1 cellpadding=2 cellspacing=2 class=biggertext>";
 
echo "<tr><td><b>date</b></td><td><b>name</b></td><td><b>email</b></td><td><b>contact address</td><td><b>mobile number</b></td><td><b>work/home telno.</b></td><td><b>contact postcode</b></td><td><b>project postcode</b></td><td><b>starter kit</b></td><td><b>survey kit</b></td><td><b>design kit</b></td><td><b>support kit</b></td><td><b>cost and value kit</b></td><td><b>construction kit</b></td><td><b>starter kit pack</b></td><td><b>design and cost pack</b></td><td><b>drawings kit pack</b></td><td><b>permission kit pack</b></td><td><b>what do you need?</b></td><td><b>design style</b></td><td><b>project</b></td><td><b>use</b></td><td><b>engineer</b></td><td><b>party wall</b></td><td><b>architect</b></td><td><b>project<br>manager</b></td><td><b>design</b></td><td><b>lifestyle</b></td><td><b>structural</b></td><td><b>planning</b></td><td><b>building regs</b></td><td><b>other help</b></td><td><b>wheelchair</b></td><td><b>partial eyesight<b></td><td><b>terraced<b></td><td><b>family and<br>childern</b></td><td><b>semi-detached</b></td><td><b>aged</b></td><td><b>allergy</b></td><td><b>detached</b></td><td><b>other needs</b></td><td><b>specify needs</b></td><td><b>project time</b><br><b>completion</b></td><td><b>budget cost</b></td><td><b>project<br>deadline</b></td><td><b>why build</b></td><td><b>other notes</b></td></tr>";
 
while ($myrow = mysql_fetch_array($result))
 
{
 
echo "<tr><td>";
 
echo $myrow["my_date"];
 
echo "<td>";
 
echo $myrow["name"];
 
echo "<td>";
 
echo $myrow["email"];
 
echo "<td>";
 
echo $myrow["contactaddress"];
 
echo "<td>";
 
echo $myrow["mobile"];
 
echo "<td>";
 
echo $myrow["workhometel"];
 
echo "<td>";
 
echo $myrow["contactpostcode"];
 
echo "<td>";
 
echo $myrow["projectpostcode"];
 
echo "<td>";
 
echo $myrow["starterkit"];
 
echo "<td>";
 
echo $myrow["surveykit"];
 
echo "<td>";
 
echo $myrow["designkit"];
 
echo "<td>";
 
echo $myrow["supportkit"];
 
echo "<td>";
 
echo $myrow["costvaluekit"];
 
echo "<td>";
 
echo $myrow["constructionkit"];
 
echo "<td>";
 
echo $myrow["starterkitpack"];
 
echo "<td>";
 
echo $myrow["designcostpack"];
 
echo "<td>";
 
echo $myrow["drawingskitpack"];
 
echo "<td>";
 
echo $myrow["permissionkitpack"];
 
echo "<td>";
 
echo $myrow["doyouneed"];
 
echo "<td>";
 
echo $myrow["designstyle"];
 
echo "<td>";
 
echo $myrow["project"];
 
echo "<td>";
 
echo $myrow["uses"];
 
echo "<td>";
 
echo $myrow["engineer"];
 
echo "<td>";
 
echo $myrow["partywall"];
 
echo "<td>";
 
echo $myrow["architect"];
 
echo "<td>";
 
echo $myrow["projectmanager"];
 
echo "<td>";
 
echo $myrow["design"];
 
echo "<td>";
 
echo $myrow["lifestyle"];
 
echo "<td>";
 
echo $myrow["structural"];
 
echo "<td>";
 
echo $myrow["planning"];
 
echo "<td>";
 
echo $myrow["buildingregs"];
 
echo "<td>";
 
echo $myrow["otherhelp"];
 
echo "<td>";
 
echo $myrow["wheelchair"];
 
echo "<td>";
 
echo $myrow["partialeyesight"];
 
echo "<td>";
 
echo $myrow["terraced"];
 
echo "<td>";
 
echo $myrow["familychildern"];
 
echo "<td>";
 
echo $myrow["semidetached"];
 
echo "<td>";
 
echo $myrow["aged"];
 
echo "<td>";
 
echo $myrow["allergy"];
 
echo "<td>";
 
echo $myrow["detached"];
 
echo "<td>";
 
echo $myrow["otherneeds"];
 
echo "<td>";
 
echo $myrow["specifyneeds"];
 
echo "<td>";
 
echo $myrow["programtimecompletion"];
 
echo "<td>";
 
echo $myrow["budgetcost"];
 
echo "<td>";
 
echo $myrow["projectdeadline"];
 
echo "<td>";
 
echo $myrow["whybuild"];
 
echo "<td>";
 
echo $myrow["otherpreferences"];
 
}
 
echo "</table>";
  1. echo "<table border=1 cellpadding=2 cellspacing=2 class=biggertext>";
  2.  
  3. echo "<tr><td><b>date</b></td><td><b>name</b></td><td><b>email</b></td><td><b>contact address</td><td><b>mobile number</b></td><td><b>work/home telno.</b></td><td><b>contact postcode</b></td><td><b>project postcode</b></td><td><b>starter kit</b></td><td><b>survey kit</b></td><td><b>design kit</b></td><td><b>support kit</b></td><td><b>cost and value kit</b></td><td><b>construction kit</b></td><td><b>starter kit pack</b></td><td><b>design and cost pack</b></td><td><b>drawings kit pack</b></td><td><b>permission kit pack</b></td><td><b>what do you need?</b></td><td><b>design style</b></td><td><b>project</b></td><td><b>use</b></td><td><b>engineer</b></td><td><b>party wall</b></td><td><b>architect</b></td><td><b>project<br>manager</b></td><td><b>design</b></td><td><b>lifestyle</b></td><td><b>structural</b></td><td><b>planning</b></td><td><b>building regs</b></td><td><b>other help</b></td><td><b>wheelchair</b></td><td><b>partial eyesight<b></td><td><b>terraced<b></td><td><b>family and<br>childern</b></td><td><b>semi-detached</b></td><td><b>aged</b></td><td><b>allergy</b></td><td><b>detached</b></td><td><b>other needs</b></td><td><b>specify needs</b></td><td><b>project time</b><br><b>completion</b></td><td><b>budget cost</b></td><td><b>project<br>deadline</b></td><td><b>why build</b></td><td><b>other notes</b></td></tr>";
  4.  
  5. while ($myrow = mysql_fetch_array($result))
  6.  
  7. {
  8.  
  9. echo "<tr><td>";
  10.  
  11. echo $myrow["my_date"];
  12.  
  13. echo "<td>";
  14.  
  15. echo $myrow["name"];
  16.  
  17. echo "<td>";
  18.  
  19. echo $myrow["email"];
  20.  
  21. echo "<td>";
  22.  
  23. echo $myrow["contactaddress"];
  24.  
  25. echo "<td>";
  26.  
  27. echo $myrow["mobile"];
  28.  
  29. echo "<td>";
  30.  
  31. echo $myrow["workhometel"];
  32.  
  33. echo "<td>";
  34.  
  35. echo $myrow["contactpostcode"];
  36.  
  37. echo "<td>";
  38.  
  39. echo $myrow["projectpostcode"];
  40.  
  41. echo "<td>";
  42.  
  43. echo $myrow["starterkit"];
  44.  
  45. echo "<td>";
  46.  
  47. echo $myrow["surveykit"];
  48.  
  49. echo "<td>";
  50.  
  51. echo $myrow["designkit"];
  52.  
  53. echo "<td>";
  54.  
  55. echo $myrow["supportkit"];
  56.  
  57. echo "<td>";
  58.  
  59. echo $myrow["costvaluekit"];
  60.  
  61. echo "<td>";
  62.  
  63. echo $myrow["constructionkit"];
  64.  
  65. echo "<td>";
  66.  
  67. echo $myrow["starterkitpack"];
  68.  
  69. echo "<td>";
  70.  
  71. echo $myrow["designcostpack"];
  72.  
  73. echo "<td>";
  74.  
  75. echo $myrow["drawingskitpack"];
  76.  
  77. echo "<td>";
  78.  
  79. echo $myrow["permissionkitpack"];
  80.  
  81. echo "<td>";
  82.  
  83. echo $myrow["doyouneed"];
  84.  
  85. echo "<td>";
  86.  
  87. echo $myrow["designstyle"];
  88.  
  89. echo "<td>";
  90.  
  91. echo $myrow["project"];
  92.  
  93. echo "<td>";
  94.  
  95. echo $myrow["uses"];
  96.  
  97. echo "<td>";
  98.  
  99. echo $myrow["engineer"];
  100.  
  101. echo "<td>";
  102.  
  103. echo $myrow["partywall"];
  104.  
  105. echo "<td>";
  106.  
  107. echo $myrow["architect"];
  108.  
  109. echo "<td>";
  110.  
  111. echo $myrow["projectmanager"];
  112.  
  113. echo "<td>";
  114.  
  115. echo $myrow["design"];
  116.  
  117. echo "<td>";
  118.  
  119. echo $myrow["lifestyle"];
  120.  
  121. echo "<td>";
  122.  
  123. echo $myrow["structural"];
  124.  
  125. echo "<td>";
  126.  
  127. echo $myrow["planning"];
  128.  
  129. echo "<td>";
  130.  
  131. echo $myrow["buildingregs"];
  132.  
  133. echo "<td>";
  134.  
  135. echo $myrow["otherhelp"];
  136.  
  137. echo "<td>";
  138.  
  139. echo $myrow["wheelchair"];
  140.  
  141. echo "<td>";
  142.  
  143. echo $myrow["partialeyesight"];
  144.  
  145. echo "<td>";
  146.  
  147. echo $myrow["terraced"];
  148.  
  149. echo "<td>";
  150.  
  151. echo $myrow["familychildern"];
  152.  
  153. echo "<td>";
  154.  
  155. echo $myrow["semidetached"];
  156.  
  157. echo "<td>";
  158.  
  159. echo $myrow["aged"];
  160.  
  161. echo "<td>";
  162.  
  163. echo $myrow["allergy"];
  164.  
  165. echo "<td>";
  166.  
  167. echo $myrow["detached"];
  168.  
  169. echo "<td>";
  170.  
  171. echo $myrow["otherneeds"];
  172.  
  173. echo "<td>";
  174.  
  175. echo $myrow["specifyneeds"];
  176.  
  177. echo "<td>";
  178.  
  179. echo $myrow["programtimecompletion"];
  180.  
  181. echo "<td>";
  182.  
  183. echo $myrow["budgetcost"];
  184.  
  185. echo "<td>";
  186.  
  187. echo $myrow["projectdeadline"];
  188.  
  189. echo "<td>";
  190.  
  191. echo $myrow["whybuild"];
  192.  
  193. echo "<td>";
  194.  
  195. echo $myrow["otherpreferences"];
  196.  
  197. }
  198.  
  199. echo "</table>";

i would still want tables but i want them inside frames. i am nit sure whether i need to split the file up into 2 or have a scrollable Iframe for the lower table that shows the results.

any help on this would be appreciated.

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 72 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.