djdellux Posted December 17, 2008 Share Posted December 17, 2008 i have 4 different files that need to be used as a ?db? so when an employee needs info from them sqlite accesses the file so it can continuously be updated. is there a way to do this cuz google has all the wrong answers or maybe I'm not asking the right questions... get at me fellas thx Quote Link to comment https://forums.phpfreaks.com/topic/137380-need-to-access-files-upon-user-querys/ Share on other sites More sharing options...
trq Posted December 17, 2008 Share Posted December 17, 2008 Indeed it would appear you are not asking the right questions. I can't make head or tails of your post. Quote Link to comment https://forums.phpfreaks.com/topic/137380-need-to-access-files-upon-user-querys/#findComment-717855 Share on other sites More sharing options...
newcoder Posted December 17, 2008 Share Posted December 17, 2008 thorpe thanks for letting me know. heres a little more of a tuned explanation... I have 4 excel files that contain 17 col a piece with..well just say an infinite amount of rows. OK well i need to be able to make a form that a "user" can input information into, and be able to search thru them for specific info. these excel docs are going to have info continuously updated into them. so naturally i cant use the "copy's" i have. i need to be able to go back to them and "pull" the data out when the "user" asks for it. my question is ...' how the hell do i do that' LOL ie. not input the file to a db or do i and is there a way of having that db keeping updated act as the reference point for the search. i hope this is better and if I'm still vague in any area please let me know. i am still very new to this process. Quote Link to comment https://forums.phpfreaks.com/topic/137380-need-to-access-files-upon-user-querys/#findComment-717949 Share on other sites More sharing options...
newcoder Posted December 17, 2008 Share Posted December 17, 2008 btw newcoder=djdellux Quote Link to comment https://forums.phpfreaks.com/topic/137380-need-to-access-files-upon-user-querys/#findComment-717951 Share on other sites More sharing options...
newcoder Posted December 17, 2008 Share Posted December 17, 2008 heres the code and im wondering about an array_push??????? <?php $dbvoip = sqlite_open($_SERVER['DOCUMENT_ROOT']."/../data/voip.db"); if ($dbvoip == false) { die ('Unable to open database'); } else { //echo 'Database created.'; } $dbinfo1=file("atlMaster.csv"); $dbinfo2=file("cseMaster.csv"); $dbinfo3=file("pacMaster.csv"); $dbinfo4=file("parMaster.csv"); foreach ($dbinfo as $dbquery); { //$data =implode(",",$dbquery); $dbquery = "INSERT INTO voiplog ( number1, number2, type, number3, linetype, c1, dial, c2, date1, date2, date3, c3, c4, anw, Documentaion, unix) VALUES ($dbquery)"; echo($dbquery); } //sqlite_close($dbvoip) $pageQuery = "SELECT * FROM voiplog "; $pageResult = sqlite_query($dbvoip, $pageQuery); //echo $pageResult; if(isset($_GET['submitted']) && $_GET["submitted"] == "send")// line check { if ($_GET["number1"] !="") $conditions[] = " number1 =\"" .$_GET["number1"]."\""; if ($_GET["number2"] !="") $conditions[] = " number2=\"".$_GET["number2"]."\""; if ($_GET["type"] !="") $conditions[] = " type=\"".$_GET["type"]."\""; if ($_GET["number3"] !="") $conditions[] = " number3=\"".$_GET["number3"]."\""; if ($_GET["linetype"] !="") $conditions[] = " linetype=\"".$_GET["linetype"]."\""; if ($_GET["c1"] !="") $conditions[] = " c1=\"".$_GET["c1"]."\""; if ($_GET["dial"] !="") $conditions[] = " dial=\"".$_GET["dial"]."\""; if ($_GET["c2"] !="") $conditions[] = " c2=\"".$_GET["c2"]."\""; if ($_GET["date1"] !="") $conditions[] = " date1=\"".$_GET["date1"]."\""; if ($_GET["date2"] !="") $conditions[] = " date2=\"".$_GET["date2"]."\""; if ($_GET["date3"] !="") $conditions[] = " date3=\"".$_GET["dtae3"]."\""; if ($_GET["c3"] !="") $conditions[] = " c3=\"".$_GET["c3"]."\""; if ($_GET["c4"] !="") $conditions[] = " c4=\"".$_GET["c4"]."\""; if ($_GET["anw"] !="") $conditions[] = " anw=\"".$_GET["anw"]."\""; if ($_GET["Documentaion"] !="") $conditions[] = " Documentaion=\"".$_GET["Documentaion"]."\""; if ($_GET["unix"] !="") $conditions[] = " unix=\"".$_GET["unix"]."\""; } ?> <html> <head> <title>VOIP DB</title> </head> <body> <h1 align=center><b>--VOIP SEARCH--</b></h1> <h1 align=left>Please enter search fields:</h1> <body bgcolor="000000" text="FFFFFF"> <form method="get"> : <select name="page"> <option value=""></option> </select> : <select name=" "> <option value=""></option> </select> : <input type=" " name=" "> <option value=""></option> : <input type=" " name=" "> <option value=""></option> <p><input name="submitted" type="submit" value="send"/></p></form> <style type='text/css'> <table { border-width: 1px; border-spacing:0px ; border-style: double; border-color: black; border-collapse: separate; background-color: #0000FF; } table tr { border-width: 1px; padding: 3px; border-style: solid; border-color: black; background-color: #0000FF; } table th { border-width: 1px; padding: 0px; border-style: solid; border-color: black; background-color: #0000FF; } table td { border-width: 1px; padding: 3px; border-style: solid; border-color: black; background-color: #0000FF; } </style> <table class='db'; cellspacing=\"0px\">"; </html> Quote Link to comment https://forums.phpfreaks.com/topic/137380-need-to-access-files-upon-user-querys/#findComment-718009 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.