Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql isshow

<sql id="criteria"> <trim prefix="and(" suffix=") " prefixOverrides="OR"> <foreach item='type' collection="typeArr"> <trim prefix="OR"> <choose> <when test="type== 'T'.toString()"> post_title like '%' || #{keyword}||'%' </when> <when test="type== 'C'.toString()"> post_content like '%' || #{keyword}||'%' </when> <when test="type== 'W'.toString()"> post_writer like '%' || #{keyword}||'%' </when> </choose> </trim> </foreach> </trim> </sql> <select id="selectboardList" resultType="board"> select * from (select rownum rno,b.* from board_post b where isshow != 'N' <include refid="criteria"></include> order by post_no desc ) where rno between (#{pageNum}-1)*#{amount}+1 and (#{pageNum})*#{amount} </select>

Comment

PREVIOUS NEXT
Code Example
Sql :: grant privileges mysql to database 1064 
Sql :: sqlalchemy get sql 
Sql :: SQL Modulo (Remainder) Operator 
Sql :: sql delete where x or y or z 
Sql :: hallo 
Sql :: changer un mot de passe mysql 
Sql :: hierarchal database table 
Sql :: use mysql 8 without password 
Sql :: mysqlimport: Error: 4166 
Sql :: SQL BETWEEN OPERATOR With Texts 
Sql :: oracle synonym package dblink 
Sql :: fetching data from mysqldb 
Sql :: get start of week big query 
Sql :: how to make trigger in phpmyadmin 
Sql :: convert db timestamp to date 
Sql :: code to move ietms from one table to another myswl 
Sql :: connect colab with Microsoft sql server 
Sql :: Character Limitation in sp_executesql sql server 
Sql :: oracle run_duration to number 
Sql :: pgsql commit rollback example 
Sql :: update all linkedserver tables with openquery on db 
Sql :: postgre regex exactly 1 characters 
Sql :: ceil upto 2 decimal place mysql 
Sql :: kill thread 
Sql :: get last 3 years data in mysql 
Sql :: row_number equivalent MS Access for sequential id By Group (3) 
Sql :: C# check if mysql query modified rows 
Sql :: modulous in sql 
Sql :: how to combine rows in sql server procedure 
Sql :: suse start MySQL 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =