Jump to content

LIKE operator


jamkelvl

Recommended Posts

I am storing a serialized array in a column assigned_to the data looks like...

 

a:1:{i:0;s:2:"LS";}

 

What I want to do is look thru all the crazy data from the serialized array looking for "Unassigned" and "UN" all I've thought to try is:

 

SELECT * FROM table WHERE assigned_to LIKE 'un%' ***EDIT**** <----- this works in phpmyadmin not in my php select...

 

<?php
$select = "SELECT * FROM jobs WHERE assigned_to like = '%u%'";
?>

 

but have had no results come up in php

 

how can I do this (these select statements are in php so maybe I unserialize first or something?)

Link to comment
https://forums.phpfreaks.com/topic/190716-like-operator/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.