Posts

Showing posts from March, 2024

SQL - where and order clause together

  When you run a SELECT query without any sorting options, the SQL server returns the records in an indiscriminate order. In most cases, the SQL server returns records in the same order they are added to the database. There is no guarantee that records are returned in a specific order when you don't use sorting options in SQL. In addition to sorting, you also use filtering options to return only specific records that match your requirements.  Sorting Your Records SQL uses the ORDER BY statement to sort records. You can sort records in ascending or descending order, and you can sort records based on multiple columns. SQL lets you sort alphabetically, numerically or chronologically.  For instance, suppose you want to get a list of your customers, and you need the list in alphabetical order by state. The following is your current list of customers.  CustomerId First_name Last_name City State 321 Frank Loe Dallas TX 455 Ed Thompson Atlanta GA 456 Ed Thompson Atlanta GA 4...

Text inlining in HTML, CSS, JAVASCRIPT

  12.2 Text inlining Text inlining  is very similar to the  expression inlining  capability we have just seen, but it actually adds more power. It has to be enabled explicitly with  th:inline="text" . Text inlining not only allows us to use the same  inlined expressions  we just saw, but in fact processes  tag bodies  as if they were templates processed in the  TEXT  template mode, which allows us to perform text-based template logic (not only output expressions). We will see more about this in the next chapter about the  textual template modes . 12.3 JavaScript inlining JavaScript inlining allows for a better integration of JavaScript  <script>  blocks in templates being processed in the  HTML  template mode. As with  text inlining , this is actually equivalent to processing the scripts contents as if they were templates in the  JAVASCRIPT  template mode, and therefore all the power of ...

popUp new window open with new link

  <a style="padding:5px 8px;background-color:#00e64d;text-decoration:none;color:white" th:href="@{/admin/editProductInfo/{productid}(productid=${a1.productId})}" onclick="basicPopup(this.href);return false">    Edit</a>   <script type="text/javascript">    function basicPopup(url) {    popupWindow = window.open(url,'popUpWindow','height=600,width=900,left=50,top=50,resizable=no,scrollbars=no,toolbar=yes,menubar=no,location=no,directories=no, status=yes')     }    </script>