I have a PHP function to show message with hashtag.
PHP code like this :
include 'includes/_db_.php';
$sql_t = "SELECT message FROM t_haps_wall WHERE message LIKE '%#%'";
$hasil_t = mysql_query($sql_t) or die(mysql_error());
while($data_t = mysql_fetch_array($hasil_t))
{
$message_t = $data_t['message'];
}
This code is running ok, but now how to set just hashtag show ? If in example like this :
Message = I like you #loveyou
In my current, It will show all message, I just want show #loveyou. Is it possible ?
Thanks for helps.
SELECT SUBSTR(message, LOCATE('#', message)) hashtag
FROM t_haps_wall
WHERE message like '%#%'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With