-
Content Count
727 -
Joined
-
Last visited
-
lol, thanks Barand. I was able to test it and it worked. So now it is bilingual but not Multi at this time. Maybe down the road.
-
Adding this should work should it not? À-ÿ regexp"=>"/^[a-zA-ZÀ-ÿ-\s]+$/
-
Then I am in trouble because it never crossed my mind until you brought it up.
-
Figured it out. Was putting the - in the wrong spot: options"=>array("regexp"=>"/^[a-zA-Z-\s]+$/")))){
-
Having a validation issue when a person enters a - in there name it is kicking it back as invalid. For axample: Mary-Ann Invalid Mary Ann Valid Tried including the - but causing myself a lot of grief. function filterkudoagent($field){ // Sanitize user name $field = filter_var(trim($field), FILTER_SANITIZE_STRING); // Validate user name if(filter_var($field, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[a-zA-Z\s]+$/")))){ return $field; } else { return FALSE; } }
-
Awesome Barand thank you. I also see what I can start it on any day. Again thank you. Much easier than what I was attempting to do and PS: This link in your signature. Still reading it over. Thank you
-
I am currently working on a date range script and wondering if anybody think of an easier way to do this, doing up to next 8 weeks? This one starts on a Sunday. I also need to do one starting on a Monday (will figure that one later) $thisweek = date("Y-m-d"); $week = date('w', strtotime($thisweek)); $date = new DateTime($thisweek); $firstWeek = $date->modify("-".$week." day")->format("M d"); $endWeek = $date->modify("+6 day")->format("M d"); echo $firstWeek." - "; echo $endWeek; $nextweek = date(("Y-m-d"), strtotime("+7 Days")); $week1 = date('w', strtotime($nextweek)); $date1 = new DateTime($nextweek); $firstWeek1 = $date1->modify("-".$week1." day")->format("M d"); $endWeek1 = $date1->modify("+6 day")->format("M d"); echo $firstWeek1." - "; echo $endWeek1;
-
Select random but limit 1 to show from last 10 entries
SkyRanger replied to SkyRanger's topic in MySQL Help
Yeah I forgot old feller...lol -
Select random but limit 1 to show from last 10 entries
SkyRanger replied to SkyRanger's topic in MySQL Help
Thank you to the both of you. I am almost 50, doing this late in life and self teaching with the help of great people like you. Thank you again. -
Select random but limit 1 to show from last 10 entries
SkyRanger replied to SkyRanger's topic in MySQL Help
It does Barand. Thank you. Shows how much I know about sql. Did not know you could use a select within a select. Learning something new every day. -
Thanks Barand, I actually got it to work perfectly from the Sept 9th post you helped me with but been away for a bit and first time back to comment on benanamen post and try to solve another problem I posted in a different through with pulling random posts that I know I have done dozens of times but having a brain meltdown...lol
-
Right now I have a little over 400 entries but I am trying to figure out how to only pull 1 entry from the last 10 inserted. Currently I have: SELECT * FROM $tablename ORDER BY RAND() LIMIT 1 I do know I need to do order by kuid asc but not sure how to pull 1 out of the last 10 inserted randomly on page refresh.
-
Hi benanamen what I am doing is when an entry is submitted a random key is entered also for each entry