mysql - PHP search through SQL -


I'm trying to organize it in the table with my column, but every time I try I really get something messy or totally wrong in the wrong. If I can get some help in implementing the table from SQL, which would be great, for example see this picture:

Here is the code

 < Code> $ dbHost = 'localhost'; // localhost will be used in most cases $ dbUser = 'root'; $ DbPass = 'root'; $ DbDatabase = 'root'; // The $ CON = mysql_connect ($ dbHost, $ dbUser, $ dbPass) or trigger_error ("MySQL server failed to connect to error." MySQL_error ()); Failed to connect to mysql_select_db ($ dbDatabase) or trigger_error ("database {$ dbDatabase}." Error: ". Mysql_error ()); $ Error = array (); $ Result = array (); If (isset ($ _GET ['search'])) {$ searchTerms = trim ($ _GET ['search']); $ SearchTerms = Tab_tag ($ SearchTerms); // Remove any HTML / Javascript if (Stralean ($ Search Terms) & lt; 2) {$ error [] = "The search term should be longer than 2 characters."; } And {$ searchTermDB = mysql_real_escape_string ($ search terms); // stop SQL injection} // If there are no errors, then search will run. If (count ($ error)) & lt; 1) {$ searchSQL = "Selection brand name, manufacturer, distributor, model number, date, productivity, where is the timeframe"; // Hold the search type. $ Type = array (); $ Type [] = release ($ _ GET ['brand name'])? '% {$ SearchTermDB}%' "like 'brand name': ''; $ Type [] = release ($ _GET ['creator'])? '% {$ SearchTermDB}%' "like" manufacturer ": ''; $ type [] = release ($ _GET ['distributor']) ''% {$ searchTermDB} '' like" distributor ": '' $ Type [] = release ($ _GET ['modelnumber']) ''% {$ searchTermDB}% '"like" ModelNumber ":' '; $ type [] = release ($ _GET [' E ']' ''% {$ SearchTermDB}% '"like' e ':' '; $ type [] = release ($ _GET [' F '])?" Like' F '% {$ searchTermDB }% Type ":"; $ type = array_filter ($ type, "remove"); // if any item is empty (unchecked) removes (calculation ($ type)) & lt; 1) $ type [] = '% {$ searchTermDB}%' "like 'brandname`; // Use the body as the basic search, if no one is checking $ and OR = release ($ _GET ['Milan'])? 'And': 'or'; $ SearchSQL = Implode ("$ {$ andOr}", $ type). "Brand name" by command; // command from the command $ SearchResult = mysql_query ($ searchSQL) or trigger_error ("was an error. 
Mysql_error ()."
SQL: {$ searchSQL} } "); If (mysql_num_rows ($ searchResult) & lt; 1) {$ error [] = "The given search term {$ searchTerms} did not return any results."; } And {$ result = array (); // results array $ i = 1; ($ Row = mysql_fetch_assoc ($ searchResult)) {$ result [] = "{$ i}: & lt; b & gt; Brand name: & lt; / b & gt; {$ row ['brandname']} & & lt; b & gt; Distributor: & lt; / b & gt; {$ row ['distributor']}

Producer: & Lt; / b & gt; {$ row ['creator']}
Model number: & lt; / b & gt; {$ row ['modelnumber']} &


& gt; Certification Agency: & lt; / b & gt; {$ row ['E']} {$ line ['F']}

Br> & lt; br / & gt; "; $ I ++; }

You should be more specific, I really do not understand what you are asking For the sake of But as a starting point, it appears by simply walking around your code that there is no missing corali bracket in your last 'other' statement, which is causing the problem. You say: "I am trying to settle it in my table with my column, but every time I try, I find something wrong or completely wrong", but what is "this", and we How do you help, Does the T-statement mean you "False False"? It can mean anything ...

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -