Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

SUBSTR in MySQL problem

Hey guys. I have a problem in a select query that I haven't been able to solve.
Scenario: db field = post_date (string) values are: 09/12/2020 etc etc etc
I'm trying to do this: substr('post_date',0,2) LIKE '09%' ... this doesn't work and neither does this WHERE post_date LIKE '09%'
What I need to do is get only the records that have a 'post_date' of '09' (September). Any help would be appreciated as always.
Sorry that doesn't work either; you see, post_date is NOT a date field it's a varchar field. But I'll try that on the posted field which is a date field.
Doesn't work on the posted field either which is epoch date.
Sure do need some help with this one. Anyone else willing to try?
use substr and like with LIKE '%$val%' format on the month or change how it is stored.

 
That doesn't work for me either. I guess I will just abandon this idea. The reason for doing it this way was to make pagination work right.
I have another question. How can this code line from my calendar script REFUSE to acknowledge the "A" tag and "LINK" ??
if(0 != $dayOfWeek) {
echo "<td style='text-align:center; font-size:12px; color:#000; background:#ddd;'><a class='cats' href='single_post.php?topic_id=".$topic."'>$dayOfWeek</a></td>\n";
}
No matter which browser I use the link WILL not show up for the calendar days. I do not understand why.
issue is prolly here, if(0 != $dayOfWeek) {
Thread Information
Author
Replies
8 posts
Views
113 times
Last Post
Last updated on 6 days ago
Related Threads
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, Grimloch, RobiNN