Display problem is the result of a SQL database

Hey everybody,

So I'm basically pretty new coding, I do a tutorial that I found on the web and try to implement in my own. I have got so far into it and now have hit a problem, when I search an item in a database, that it will not find and a previous problem I had was that it was all rather sought records records afficherdans. In any case, here's my code and I would appreciate greatly any help I'm stuck on it for weeks now, trying to change is around and its really disheartening. PS The link to the tutorial if all his help is:http://www.sebastiansulinski.co.uk/web_design_tutorials/tutorial/9/link_exchange_system_wi th_dreamweaver_cs3

Thank you

Frank

<? php require_once('.. / Connections/cbdb.php');? >
<? PHP
If (! function_exists ("GetSQLValueString")) {}
function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
If (via PHP_VERSION < 6) {}
$theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;
}

$theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

Switch ($theType) {}
case 'text ':
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "long":
case "int":
$theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
break;
case "double":
$theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';
break;
case "date":
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "set":
$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
break;
}
Return $theValue;
}
}

$maxRows_rsStock = 20;
$pageNum_rsStock = 0;
If (isset($_GET['pageNum_rsStock'])) {}
$pageNum_rsStock = $_GET ['pageNum_rsStock'];
}
$startRow_rsStock = $pageNum_rsStock * $maxRows_rsStock;

@mysql_select_db ($database_cbdb, $cbdb);

Search Engine feature
If ($_GET ['make']: $_GET ['model']) {}

$key = $_GET ['make'];
$categ = $_GET ["template"];

$query_rsStock = "SELECT * STOCK WHERE LIKE stock.model" % $make % "AND stock.model LIKE ' % $model % ' ORDER BY stock.date DESC";

} else {}

$query_rsStock = "SELECT * FROM stock ORDER BY date DESC ';

}

$query_limit_rsStock = sprintf ("%s LIMIT %d, %d", $query_rsStock, $startRow_rsStock, $maxRows_rsStock);
$rsStock = mysql_query ($query_limit_rsStock, $cbdb) or die (mysql_error ());
$row_rsStock = mysql_fetch_assoc ($rsStock);


If (isset($_GET['totalRows_rsStock'])) {}
$totalRows_rsStock = $_GET ['totalRows_rsStock'];
} else {}
$all_rsStock = mysql_query ($query_rsStock);
$totalRows_rsStock = mysql_num_rows ($all_rsStock);
}
$totalPages_rsStock = ceil($totalRows_rsStock/$maxRows_rsStock)-1;
? >
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
"< html xmlns ="http://www.w3.org/1999/xhtml"> <!-InstanceBegin template="/Templates/admin.dwt.php ' codeOutsideHTMLIsLocked = 'false'->
< head >
< meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
<!-InstanceBeginEditable name = "doctitle"-->

<! - InstanceEndEditable - >
"" < link href = "... / style/admin_style.css" rel = "stylesheet" type = "text/css" media = "screen" / >
<!-InstanceBeginEditable name = "head"--> < title > Stock list < /title >

< script type = "text/javascript" >
function tmt_confirm (msg) {}
document. MM_returnValue = (confirm (unescape (MSG)));
}
< /script >
<! - InstanceEndEditable - >
< / head >

< body >
< div id = 'wrapper' >
< div id = "header" > < p > Admin < /p > < / div >
< div id = "navigation" >
< ul id = "mainav" >
< li > < a href = "stock_list.php" > list of stock < /a > < /li >
< li > < a href = "stock_add.php" > add new stock < /a > < /li >
< li > < a href = "make_add.php" > fact < /a > < /li > ""
< li > < a href = "logout.php" > sign out < /a > < /li > ""
< id li 'before' = > < a href = "C:\xampp\htdocs\CarBreakers" target = "_blank" > front < /a > < /li >
< /ul >
< / div >
< div id = "container" > <!-name = 'Content'-> InstanceBeginEditable

< id p 'ptitle' = > inventory < /p >
< do action = "<?" PHP echo $_SERVER ['PHP_SELF'];? ' > ' method = 'get' id = 'forminsert' >
< table border = "0" cellspacing = "0" cellpadding = "0" id = "tblinsert" >
< caption >
Stock research
< / legend >
< b >
< th > < label for 'keyword' = > do: < / label > < /th >
< td > < input type = "text" name = "make" id = "make" / > < table >

< th > < label for = "model" > model: < / label > < /th >
< td > < input type = "text" name = "model" id = "template" / > < table >

< td > < input type = "submit" id = "button" value = "Submit" / > < table >

< /tr >
< /table >

< / make >
<? PHP if ($totalRows_rsStock > 0) {/ / show if recordset not empty? >}
<? PHP if ($totalRows_rsStock == 0) {/ / show if recordset empty? >}
< p > sorry, there is no record that matches your search criteria. < /p >
<? PHP} / / Show if recordset empty? >
< table border = "0" cellpadding = "0" cellspacing = "0" id = "tblrepeat" >
< b >
< th = "63" scope = "col" width > do < /th >
< th width = "67" scope = "col" > model < /th >
< th width = "59" scope = "col" > year < /th >
< th width = "79" scope = "col" > engine cc < /th >
< th = "56" scope = "col" width > fuel < /th >
< th = "59" scope = "col" width > doors < /th >
< th width = "56" scope = "col" > body < /th >
check < /th > < th = "104" scope = "col" width > Date
< th = "51" scope = "col" width > edit < /th >
< th = "83" scope = "col" width > delete < /th >
< /tr >
<? PHP {? >}
< b >
< td > <? PHP echo $row_rsStock ['make'];? > < table >
< td > <? PHP echo $row_rsStock ['template'];? > < table >
< td > <? PHP echo $row_rsStock ["year"];? > < table >
< td > <? PHP echo $row_rsStock ['cc'];? > < table >
< td > <? PHP echo $row_rsStock ['fuel'];? > < table >
< td > <? PHP echo $row_rsStock ['House'];? > < table >
< td > <? PHP echo $row_rsStock ['body'];? > < table >
< td > <? PHP echo $row_rsStock ['date'];? > < table >
< td > < a href = "stock_edit.php? id = <?" PHP echo $row_rsStock ["stockId'];? > "> edit < /a > < table >"
< td > < a href = "stock_remove.php? id = <?" PHP echo $row_rsStock ["stockId'];? ">" onclick = "tmt_confirm ('Are % 20you % 20sure % 20you % 20want % 20to % 20perform % % 20action 20this?'); RET document urn. MM_returnValue"> delete < /a > < table >
< /tr >
<? PHP} while ($row_rsStock = mysql_fetch_assoc ($rsStock));? >
< /table >
<? PHP} / / show if recordset not empty? >
<! - InstanceEndEditable - > < / div >
"< div id ="footer"> < p > to < a href ="http://www.blablabla.com/"title ="Web Designer"target ="_blank"> Design Web < /a > < /p > < / div >"
< / div >


< / body >
<! - InstanceEnd - > < / html >
<? PHP
mysql_free_result ($rsStock);
? >

> WHERE stock.model LIKE ' % $make % ' AND stock.model LIKE ' % $model % ".

Looks like you are testing the wrong column in which your article. You compare the model twice. I suppose you want to compare the mark in one of these instance.

In addition, these types of questions belong in the forum App Dev.

Tags: Dreamweaver

Similar Questions

  • Display problem. The images have random black or white boxes that appear at different zoom levels. Picture is ok 100%

    I have recently updated my iMac last Adobe CC retina and now experience display problems. The images have random black or white boxes that appear at different zoom levels. Images ok 100% and some other levels of zoom.

    I've read other posts with the same questions.

    When Adobe gets out a fix, as this seems to be an error as Adobe making a lot of different HW platforms.

    Hi Martin,

    Please go to Preferences > Camera Raw and uncheck use display adapter. Click OK.

    Restart Photoshop and check for the issue.

    ~ UL

  • In SQL Developer, is it possible to send the results of a sql statement?

    In SQL Developer, is it possible to send the results of a sql statement?

    Right-click on the query results pane, select "Export data" in the context menu, then select "xls".

  • Problem with the help of oraext: query-database in the transformation (XSLT 2.0)

    Hello!
    I m facing a problem with the help of oraext: query-database.

    In my transformation im try the following (Simplified):
    <xsl:template match="*">
      <xsl:variable sqlQuery="select ....."/>
      <xsl:variable name="storeSec" select="oraext:query-database($sqlQuery,true(),true(),'jdbc/xref')/>               
        <xsl:choose>
         <xsl:when test="string-length($storeSec/ROWSET/ROW[1]/STORE_PART_SECTION) > 0">
              <xsl:value-of select="$storeSec/ROWSET/ROW[1]/STORE_PART_SECTION"/>
         </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select"some other val"/>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    {code}
    
    This always results in +some+ +other+ +val+ !!
    I´v checked the output from oraext:query-database by using getcontentAsString and if I instead test putting the expected output from oraext:queryDatabase in my variable it gives me A100 which is what i expected.
    
    {code}
    <xsl:template match="*">
      <xsl:variable sqlQuery=select ....."/>
      <xsl:variable name="storeSec">
        <ROWSET>
         <ROW num="1">
           <STORE_PART_SECTION>A100</STORE_PART_SECTION>
         </ROW>
         <ROW num="2">
           <STORE_PART_SECTION>XXm</STORE_PART_SECTION>
         </ROW>
        </ROWSET>
      </xsl:variable>               
        <xsl:choose>
         <xsl:when test="string-length($storeSec/ROWSET/ROW[1]/STORE_PART_SECTION) > 0">
              <xsl:value-of select="$storeSec/ROWSET/ROW[1]/STORE_PART_SECTION"/>
         </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select"some other val"/>
           </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    How to get the correct value when you use oraext:query - database?

    How should you exit? Several item ID with each having a value of the result set?
    If Yes, then you can try following:

     
                        
                            
                        
                             
                                  
                             
                        
                            
    
  • Need to create useful reports from the results of TestStand (.mdb) database

    Any help is greatly appreciated!

    We need create reports from the results of TestStand (.mdb) database.  I was not able to find much online.

    Details:

    In 2014 TestStand, we have configured to use Access database management system.  Otherwise, the database settings are default.

    These reports will be targeted to managers and engineers.  They need to show objects as:

    Which EHR past/almost?

    For each DEGREE, what past/a failed test?

    Thanks for all the suggestions!

    Because I couldn't find anything pre-made, I created reports from scratch using queries in Microsoft Access 2010.

  • Display problems with the Portege R600 and Win 7

    I have a R600 running windows 7, every two minutes, I have a display problem where where the vertical pixels seem to get every centimeter unaligned, so my screen seems to blur digital in bars across it.

    I have an external monitor attached and get the same problem with or without him. I have tired the driver of toshiba and intel driver.

    It seems to go away if I have windows min and max, but sometimes it doesn't. If I run my mouse an affected area, that it seems in trouble and sometimes it's not all screen.

    A refresh solves it.

    Anyone have any ideas?

    > I have an external monitor attached and get the same problem with or without him.
    Maybe I m wrong but in most cases if these symptoms are seen on the two displays (internal & external) then a graphics chip could be affected
    It would be the worst case, because that would mean that the motherboard needs to be replaced

    But just a question; have you noticed that using the previous Windows OS preinstalled by maybe Toshiba (Win XP or Vista), you must install the image of Toshiba again to verify if this display problem is still visible

  • How to write the result of a SQL query to a text file?

    I'm using Oracle 11 g and SQL Plus.

    I have a large table called side.

    Whenever I do


    SQL > select * rating.

    The output goes well beyond what can show the screen sqlplus. So, I want to store the result of this query in a text file.

    How is that possible? Help, please. Thank you.

    SQL > SPOOL results.txt
    SQL > select * rating.
    SQL > SPOOL OFF

  • Unexpected problem because the result would be too big...

    I've never had this message before... "an unexpected and unrecoverable problem has occurred because the result would be too big. Even do any image manipulation, I get this message. I'm under 6 items on a version of Mac OS X 10.5.8. I thought that maybe I don't have enough space on my hard drive but I still available of 50 GB. Any advice would be greatly appreciated.

    So don't worry about that one.

  • Panel display problem (only the part of the .psd file is displayed) program

    Hello

    In my film, I loaded a series of .psd files in my calendar.  (Apparently, Premiere Pro does not support imports from a Canon 5 d RAW file).

    When I play the timeline, the displayed image in the top right program is only a small part of the actual picture that I photographed.

    When I adjust the drop-down list in the Panel of the program at different sizes ('Fit', 50%, 100%) etc this does not solve the problem, it doesn't seem to change the percentage of the program group that is occupied by my image.

    Any thoughts?

    Thank you.

    Matt

    Material that you show in your Preset project are for a project SD DV NTSC 720 x 480 (4:3, BY = 0.9) Standard, so that your still images for this project must be adapted to about 720 x 480. Note: images will be square Pixels (NOMINAL = 1.0), so there is a slight difference.

    Regarding Genuine Fractals (human software), be a little cautious, that PrPro still limited format has capabilities of Import. I have an older version of Genuine Fractals and run these image via PS to the output, via Save_As PSD, the native format of the PS and a format as PrPro can work natively.

    Good luck

    Hunt

  • Display data in the report to pl/sql

    I need to display data in a report using pl/sql.

    The structure of the table would be fixed, but the data it would come from a pl/sql.

    Is this possible in Apex 3.2.1 for that? If so, how can we do this?

    Hi Hozy,

    As much as I know APEX report cannot manipulate the slider.

    If the options are:
    1)
    Try the PIPE...
    http://www.databasejournal.com/features/Oracle/article.php/2222781/returning-rows-through-a-table-function-in-Oracle.htm

    (2) as has said Roel, complete apex collection using your ps/sql and use it in the report.

    Kind regards
    Shijesh

  • Firefox has only display problems in the upper left region of only my Dell U3011 monitor; the monitor does not have these problems with any other application

    Some parts of the Firefox window are translucent, allowing the image of the desktop to show through. These regions are anything but great internet site central image which behaves normally. Unless the desktop is completely black this problem makes reading the tabs, address bar and the bookmark are difficult if not impossible. I encounter this problem only on my new Dell U3011 monitor. Firefox is the only application that has this issue on the Dell monitor. The monitor built into the laptop that animates the Dell monitor does not exhibit this problem. The laptop is a Lenovo W540 running Windows 7 64-bit. Thank you very much for your help. Steve Schupbach

    Hello stevesch

    first see : problem with Firefox going transparent troubleshoot and find a solution

    then with patience to see:

    questions/940393

    questions/940389

    questions/940374

    questions/940377

    questions/940384

    questions/940395

    Thank you

  • Problem with the two EA DEVELOPER SQL DATA MODELING 3.0.0.665 and 3.1

    I created a model of very large data using SQL Developer data 3.0.0.665 and 3.1 EA maker. Its having a lot of check constraints. Whenever I am the design of the fence and the DOF and reopening export to import the DDL file failure to import completely check constraints. It is important to check constraints, but without any range of values inside. Its very frustrating because whenever you open import ddl, you must manually add again all the details of data check range constraint.

    OS: Windows XP.
    Check in the two EA Developer SQL Data Modeler 3.0.0.665 and 3.1

    -------------------------------------------
    Here are the contents of the .dmd file.
    -------------------------------------------
    * <? XML version = "1.0" encoding = "UTF - 8"? > *.
    * < OSDM_Design class = "oracle.dbtools.crest.model.design.Design" name = 'Admin_Panel' id = "9BE18B0A-6C67-2E5B-00DE-BD8312189ECB" version = "3.41" > * "
    * < createdBy > administrator < / createdBy > *.
    * < Createduserid > 2011-10-17 08:32:18 UTC < / Createduserid > *.
    * < Admin_Panel ownerDesignName > < / ownerDesignName > *.
    * < false capitalNames > < / capitalNames > *.
    * < designId > 9BE18B0A-6C67-2E5B-00DE-BD8312189ECB < / designId > *.
    * < / OSDM_Design > *.

    -------------------------------------------------------------------------------
    An example how the check constraints to get dirty.
    -------------------------------------------------------------------------------
    Initial check constraint is as below:
    ======================
    ALTER TABLE test_table
    ADD CONSTRAINT Active_Flag_ck
    CHECK (Active_Flag IN ('A', 'I'))
    *;*

    Below how it occurs once I have imported the ddl and re-export:
    ============================================
    ALTER TABLE test_table
    ADD CONSTRAINT Active_Flag_ck
    (CHECK)
    *;*

    I'm in trouble as I already in the middle of the my development using SQL Developer Data Modeler.

    Please help me soon.

    Jean

    Hi John,.

    Every time I'm fence design and export the ddl and reopening through the import of the DDL file

    Why are you doing this? Once the DDL file is imported and then save the drawing and open simply saved design, no need to generate the DDL and import it every time that you start Modeler data.
    On the list of values - forced as this CHECK (Active_Flag IN ('A', 'I')) are imported as constraint check plain and not as a list of values.
    There are the more specific elements import of check constraint - they are defined as type database constraint that you select during the import. Accordingly if you import your DOF as Oracle 10 g DDL, then you will get forced correct check in DDL generated for Oracle 10 g and Oracle 11 g. Constraint of evil will be generated for Oracle 9i. You can move the constraint for Oracle 9i (in the check constraint dialog box) or generic if it can be treated as such constraint.

    I logged for DOF bad bug.

    Philippe

  • Does the Group of Developer SQL database objects

    Noob question

    Can group objects of Developer SQL database (tables, views, etc.) and if so, how?

    Thank you

    To be used in the browser of the object, the objects are currently grouped only by the user (login).
    However, you can:
    1 assign synonyms objects to other users.
    2. in the treenodes of your items, open the context menu, select filter
    3. close to the bottom of the filter dialog box, select include synonyms
    This would give the desired result for all objects in the database without having to use the node of other users .

    For all have them as list or report, theFurryOne already said how.

    Have fun
    K.

  • using the same datamodel with SQL database QML in 2 listviews

    I am using the code for the sample application quotes as starting point. I try to call the same SQL database with the quote template to build a list in the top level of my application and then create a list to the next heirachy.
    For, for example, imagine a list of different types of quotes (funny, sad, happy, etc.) on the home page, then the list of people with their quotes on the 2nd level and their exact quote at the 3rd level. When I use the same quotesModel qml and asyncksource at the top of the list and yet once in 2nd list level I get disconnection issues connect to my SQL database. How would I fix this?

    You only need a data source class, but you will need multiple instances of it.

    The disconnect message means that the new connection is now that of the database of driving. Will there be other errors in the log?

  • How to avoid the duplicateConnection on a sql database?

    I have a database of newspapers that I have access to both c ++ and QML.

    While everything works correctly logs qml page complained about a double connection whenever it is open, which in turn spam log file.

    In c ++, the database is initialized once, with db being QSqlDatabase:

    QString databaseFileName = QDir::homePath() + QDir::separator() + "logs.db";
    db = QSqlDatabase::addDatabase("QSQLITE", "loggerDatabase");if (!db.open()) {        printf("Critical: Error opening logs database\n");}
    

    QML, I use a very simple way to view the contents of the db: A GroupDataModel with a data source.

    I have set up a query on the data source and fill in the datamodel with the result:

    DataSource {
       id: dataSource
       source: loggerService.dbPath
       onDataLoaded: {
          dataModel.clear();
          dataModel.insertList(data);
       }
    }
    

    I assume that the data source uses SQLDataAccess to open a connection to the db, and db already has a connection there is a complaint:

    QSqlDatabasePrivate::addDatabase: duplicate connection name ' / accounts/1000/appdata/x/data/logs.db' old deleted connection.

    How can I avoid this?

    I've given up trying through QML and just dynamically added the groupDataModel of c ++.

    I was getting the same error, without reason.

Maybe you are looking for

  • Could not find the update of BIOS for Tecra A4-S211 w/PCI-E

    I can't find an update of the bios for this model. I am trying to install Windows Vista. Tried a new installation on an empty partition and an update of XP. He moved very well, but the final start in Vista. It crashes always upward. Enter safe mode f

  • How can I find out what my password forgotten directors?

    Hi I have a little problem, on the lower right of my netbook, solve pc issues icon told me to find an antivirus program-IMPORTANT! I went to the microsoft site, to get their download free security (which is fantastic!) and I am unable to download wit

  • ListStyleButtonField

    Why the eclipse can not find this class? I use the JDE 5.0. does anyone know the import for her? Thanks in advance

  • Slow InnerHTML

    Hello I have a widget that is currently about 150 cases of reading an sqlite table and building a drop-down list with the following options in. At the minute, it takes about 15 seconds to build this list by using innerHTML, is anyway to increase perf

  • How to report o create crosstab in plsql function?

    HelloI want to create a function that question of including pivot table. What should be included, I'm using (cursor, folder,...)?I transformed under code in link below for my project, but I didn't know where to put a block.Example,where I put or writ