{"id":48,"date":"2016-08-11T19:33:47","date_gmt":"2016-08-11T19:33:47","guid":{"rendered":"http:\/\/www.randolphaustin.com\/technical_documents\/?page_id=48"},"modified":"2017-10-17T09:56:47","modified_gmt":"2017-10-17T14:56:47","slug":"table-dynamic","status":"publish","type":"page","link":"https:\/\/www.randolphaustin.com\/technical_documents\/table-dynamic\/","title":{"rendered":"table dynamic  <!-- DO NOT EDIT -->"},"content":{"rendered":"<p>[insert_php]<br \/>\n$conn = new mysqli(&#8220;localhost&#8221;, &#8220;q4j8e5j1_vito&#8221;, &#8220;OO.c,Tefw,{2&#8221;, &#8220;q4j8e5j1_library&#8221;);<\/p>\n<p>\/* check connection *\/<br \/>\nif ($conn->connect_errno) {<br \/>\n    printf(&#8220;Connect failed: %s\\n&#8221;, $conn->connect_error);<br \/>\n    exit();<br \/>\n}<\/p>\n<p>$selected = $_REQUEST[&#8216;selected&#8217;];<br \/>\necho &#8220;<\/p>\n<div style=\\\"font-family: Cabin Condensed; font-size: 28px;  font-variant: normal; margin-bottom:20px; color:#979389;\\\"><strong>Randolph Peristaltic Pump Technical Documents<\/strong><\/div>\n<p>&#8220;;<\/p>\n<p>echo &#8220;<\/p>\n<table cellspacing=0 cellpadding=0>&#8220;;<\/p>\n<p>$id_counter = 0;<\/p>\n<p>$result = mysqli_query($conn,&#8221;SELECT * FROM series WHERE series = &#8216;$selected'&#8221;);<br \/>\nwhile($newArray = mysqli_fetch_array($result)){<br \/>\n$series = $newArray[&#8216;series&#8217;];<\/p>\n<p>\tif ( wpmd_is_phone() ) {<br \/>\n\t\techo &#8220;<\/p>\n<tr>\\n<\/p>\n<td valign=top colspan=20 style=\\\"color:#ffffff;\\\"><B>$series SERIES:<\/b><BR><BR><\/td>\n<p>\\n<\/tr>\n<p>&#8220;;<br \/>\n\t} else {<br \/>\n\t\techo &#8220;<\/p>\n<tr>\\n<\/p>\n<td valign=top colspan=20><B>$series SERIES:<\/b><BR><BR><\/td>\n<p>\\n<\/tr>\n<p>&#8220;;<br \/>\n\t}<\/p>\n<p>\t$result2 = mysqli_query($conn,&#8221;SELECT * FROM items WHERE series = &#8216;$selected&#8217; ORDER BY item_number&#8221;);<br \/>\n\twhile($newArray2 = mysqli_fetch_array($result2)){\t<\/p>\n<p>\t\t$id = $newArray2[&#8216;id&#8217;];<br \/>\n\t\t$item_number = trim($newArray2[&#8216;item_number&#8217;]);<br \/>\n\t\t$item_name = $newArray2[&#8216;item_name&#8217;];<\/p>\n<p>\t\t$id_counter++;<\/p>\n<p>\t\t$pdf = $newArray2[&#8216;pdf&#8217;];<br \/>\n\t\t$manual = $newArray2[&#8216;manual&#8217;];<br \/>\n\t\t$cad = $newArray2[&#8216;cad&#8217;];<br \/>\n\t\t$video = $newArray2[&#8216;video&#8217;];<br \/>\n\t\t$youtube_video_id = $newArray2[&#8216;youtube_video_id&#8217;];<\/p>\n<p>\t\techo &#8220;<\/p>\n<tr>\\n&#8221;;<br \/>\n\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\">$item_number<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\">$item_name<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\t\/\/pd<br \/>\n\t\tif($pdf == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\"><a href=\\\"https:\/\/www.randolphaustin.com\/technical_documents\/pdfs\/$item_number.pdf\\\" target=\\\"_blank\\\">&#8220;;<br \/>\n\t\t} else {<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;PDF View&#8221;;<br \/>\n\t\tif($pdf == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/a>&#8220;;<br \/>\n\t\t}<br \/>\n\t\techo &#8220;<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\t\/\/manual<br \/>\n\t\techo &#8220;<\/p>\n<td valign=top class=link nowrap>&#8220;;<br \/>\n\t\tif($manual == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\"><a href=\\\"https:\/\/www.randolphaustin.com\/technical_documents\/manuals\/$item_number.pdf\\\" target=\\\"_blank\\\">&#8220;;<br \/>\n\t\t} else {<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;Manual&#8221;;<br \/>\n\t\tif($manual == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/a>&#8220;;<br \/>\n\t\t}<br \/>\n\t\techo &#8220;<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\t\/\/cad<br \/>\n\t\techo &#8220;<\/p>\n<td valign=top class=link nowrap>&#8220;;<br \/>\n\t\tif($cad == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top style=\\\"font-weight:bold;\\\"><a href=\\\"https:\/\/www.randolphaustin.com\/technical_documents\/cad\/$item_number.zip\\\" target=\\\"_blank\\\">&#8220;;<br \/>\n\t\t} else {<br \/>\n\t\t\techo &#8220;<\/p>\n<td valign=top>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;CAD&#8221;;<br \/>\n\t\tif($cad == &#8220;on&#8221;){<br \/>\n\t\t\techo &#8220;<\/a>&#8220;;<br \/>\n\t\t}<br \/>\n\t\techo &#8220;<\/td>\n<p>\\n&#8221;;<\/p>\n<p>\t\tif ( wpmd_is_phone() ) {<br \/>\n\t\t\techo &#8220;<\/p>\n<td bgcolor=white>&nbsp;<\/td>\n<p>&#8220;;<br \/>\n\t\t}<\/p>\n<p>\t\techo &#8220;<\/tr>\n<p>\\n&#8221;;<\/p>\n<p>\t}\t<\/p>\n<p>}<br \/>\necho &#8220;<\/table>\n<p>&#8220;;<\/p>\n<p>if($id_counter < 1){\n\techo \"<strong>No data found for this series.<\/strong><BR><BR>&#8220;;<br \/>\n}<\/p>\n<p>echo &#8220;<a href=\\\"https:\/\/www.randolphaustin.com\/technical_documents\/\\\"><img src=\\\"https:\/\/www.randolphaustin.com\/technical_documents\/wp-content\/uploads\/2016\/09\/button-return.png\\\"><\/a>&#8220;;<\/p>\n<p>[\/insert_php]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[insert_php] $conn = new mysqli(&#8220;localhost&#8221;, &#8220;q4j8e5j1_vito&#8221;, &#8220;OO.c,Tefw,{2&#8221;, &#8220;q4j8e5j1_library&#8221;); \/* check connection *\/ if ($conn->connect_errno) { printf(&#8220;Connect failed: %s\\n&#8221;, $conn->connect_error); exit(); } $selected = $_REQUEST[&#8216;selected&#8217;]; echo &#8220; Randolph Peristaltic Pump Technical Documents &#8220;; echo &#8220; &#8220;; $id_counter = 0; $result = mysqli_query($conn,&#8221;SELECT * FROM series WHERE series = &#8216;$selected&#8217;&#8221;); while($newArray = mysqli_fetch_array($result)){ $series = $newArray[&#8216;series&#8217;]; if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-48","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/pages\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":46,"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/pages\/48\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/pages\/48\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/www.randolphaustin.com\/technical_documents\/wp-json\/wp\/v2\/media?parent=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}