In single SQL query itself we can retrieve the last record in each group. It will help us to perform action better, faster and simpler. In this post I will explain about you how to do it. Here is my table structure for your reference. [sql] desc post_status; +—————-+————-+——+—–+———+—————-+ | Field | Type | Null …
Tag: SQL Search Technique
Permanent link to this article: https://blog.openshell.in/2013/10/how-to-retrieve-the-last-record-in-each-group-using-mysql/
Jan 14
Searching Techniques with SQL
I want to explain basic searching techniques using SQL LIKE statement. Replace spaces Before executing SQL query searching word replace spaces with %(symbol) using PHP str_replace function. Here searching word jquery ajax spaces replaced with %(symbol)- jquery%ajax SQL ‘LIKE’ SELECT * FROM messages WHERE msg LIKE ‘%jquery%ajax%’ ; CODE: <?php if($_SERVER[“REQUEST_METHOD”] == “POST”) { $q=$_POST[‘q’]; …
Permanent link to this article: https://blog.openshell.in/2011/01/searching-techniques-with-sql/