[Solved] Querying comma separated field?

[ad_1] Just in case you really need it sorted now without redesigning your database (which I would)… $ids = array(1,2,4); $query = “SELECT room_location.*, client_room.*, users.* FROM room_location INNER JOIN client_room ON room_location.user_loc_id = client_room.id INNER JOIN users ON room_location.user_loc_id = users.userGroupLocID WHERE userGroupLocID REGEXP ‘(^|,)(“.implode(‘|’,$ids).”)(,|$)’ ORDER BY room_location.location”; 2 [ad_2] solved Querying comma separated … Read more

[Solved] Conditional fetching data from a table

[ad_1] In Your model add this method: public function getINFO(){ $query = $this->db->get_where(‘usuarios’, array(‘id’ => $this->session->userdata(‘id’))); if ($query->num_rows() > 0 ) { return $query->row_array(); } } See this link for more : https://www.codeigniter.com/user_guide/database/results.html#result-arrays 18 [ad_2] solved Conditional fetching data from a table

[Solved] 500 Internal Error, Whats wrong with my code? [closed]

[ad_1] You have a little typo in the third line: $email = mysql_real_escape_string(strip-tags($_POST[’email’])); should be $email = mysql_real_escape_string(strip_tags($_POST[’email’])); And have a look at the comments, they are quite important. 0 [ad_2] solved 500 Internal Error, Whats wrong with my code? [closed]

[Solved] How to prevent duplication entry within certain time?

[ad_1] You just have to check the old records for the cleaner on the particular date. Use the following script to get the old records with the date: $prevRecordsQuery= “SELECT COUNT(*) AS records FROM `bookings` WHERE `date` = $date AND `cleaner` = ‘$_post[cleaner]'”; $prevRecords = mysql_query($query); if($prevRecords) echo “This cleaner is fully booked”; else{ $query … Read more

[Solved] Programmatically identify PHP and ASP include dependencies [closed]

[ad_1] Many thanks to @Progrock for pointing me to checking last accessed time for files in target folder. This is what I had to do. Ensure capturing last accessed time is being set by Windows (see Directory.GetFiles keeping the last access time) Process.Start(“fsutil”, “behavior set disablelastaccess 0”).WaitForExit(); Also need to restart IIS to stop any … Read more

[Solved] php – data entry and order issue [closed]

Introduction [ad_1] This article provides a comprehensive overview of the issue of data entry and order in PHP. It explains the problem, provides a solution, and offers tips on how to prevent similar issues in the future. It also provides a step-by-step guide on how to resolve the issue. This article is intended for those … Read more

[Solved] php – data entry and order issue [closed]

[ad_1] You can implement this by doing the following: Add a column in the database and call it class_order Your SQL query should have ORDER BY class_order Moving up UPDATE table set class_order = THE_ORDER_OF_THE_CLASS_ABOVE WHERE id = TARGET_CLASS and UPDATE table set class_order = TARGET_CLASS_ORDER WHERE id = THE_CLASS_ABOVE Moving down is the opposite … Read more

[Solved] Print array values

[ad_1] if you want to sort according to values in desc order $finalprint[] = “XYZ”; $finalprint[] = “ABC”; $finalprint[] = “MNO”; rsort($finalprint); foreach ($finalprint as $val) { echo $val.” ” ; } o/p XYZ MNO ABC if you want to sort according to keys in desc order krsort($finalprint); foreach ($finalprint as $val) { echo $val.” ” ; … Read more

[Solved] application/force-download

[ad_1] Fix your code in your example and make your question more clear. That said, it’s unclear whether you’re trying to validate an uploaded file or a downloaded file. I’m going to take a wild guess and say that you might be trying to serve a file that’s already uploaded. Mimetypes are a pretty bad … Read more