Is it possible to drag drop Picklist element items between records on a list?

You need the line I gave you, with the (string), just before you execute the query.

I really can't answer that last question, as I have no clue how your data is structured.

-- hugh
 
Thanks for the suggestion, Hugh. Just seeing that my SQL string was returning correctly helped greatly. It looks like I may be having an issue with my date format that I'm returning; per the following.
Code:
string(118) " SELECT fid_employee,name,fid_project,scheduled_date FROM `bw_scheduledlabordates` WHERE `scheduled_date` = 2016-06-01"
My WHERE never gets a match (though it should) except for when I use CURDATE() by default. Could it be because my date variable is missed the time portion? If so; any suggestions?
Thanks in advance.
 
try with this... WHERE DATE (`scheduled_date`)=... or DATE FORMAT(...

Enviado desde mi SM-G531H mediante Tapatalk
 
Not a bad idea, zzzz54; but I'm having a hard time with applying the correct syntax to get the correct result. Could I trouble you for help with how to apply it to below ? Below is what returned the SQL string in forum item #22 above.
Code:
$query->where($db->quoteName('scheduled_date').' = '.$sessionscheduledate);
Thanks in advance.
 
Thanks for the suggestion, Hugh. Just seeing that my SQL string was returning correctly helped greatly. It looks like I may be having an issue with my date format that I'm returning; per the following.
Code:
string(118) " SELECT fid_employee,name,fid_project,scheduled_date FROM `bw_scheduledlabordates` WHERE `scheduled_date` = 2016-06-01"
My WHERE never gets a match (though it should) except for when I use CURDATE() by default. Could it be because my date variable is missed the time portion? If so; any suggestions?
Thanks in advance.
there's one the missing quote just before the year


Enviado desde mi SM-G531H mediante Tapatalk
 
Thanks guys. It worked! I appreciate it.
Now my next issue is trying to figure out why the following always returns the CURDATE() when there is a date value in the session variable.
Code:
if ($selectedscheduledate == NULL){
    $query->where($db->quoteName('scheduled_date').' = CURDATE()');
} else {
    $query->where($db->quoteName('scheduled_date').' = '. $db->quote($sessionscheduledate));
}
Any suggestions? Thanks in advance.
 
Hi guys.
The last question was silly of me to ask. I believe I have it; per the following.
Code:
if ($selectedscheduledate){
    $query->where($db->quoteName('scheduled_date').' = '. $db->quote($sessionscheduledate));
} else {
    $query->where($db->quoteName('scheduled_date').' = CURDATE()');
}

Now that I have the records returning correctly from my included php file; it's time for me to investigate why I still have a strange issue after I refresh the page where I only have 1 employee displaying per job and date. Below is the code I have in the Fabrik default setting of the display element.
Code:
include 'cli/resources_scheduled.php';
foreach ($arraylistScheduled as $arrayrow) {
  if ($arrayrow['fid_project']=={bw_projects___id}) {
    $fid_employee = $arrayrow['fid_employee'];
    $resourcename = $arrayrow['name'];
    return '<li id="'.$fid_employee.'" class="ui-state-default" style="list-style-type:none;padding: 5px 10px;cursor: pointer;border-radius: 5px;margin: 10px 10px 0 0;background: #3267fe;color:#ffffff;display: inline-block;-webkit-box-shadow: 0 10px 6px -6px #777;-moz-box-shadow: 0 10px 6px -6px #777;box-shadow: 0 10px 6px -6px #777;">'.$resourcename.'</li>';
  }
}
I assume this default setting of the display element re-runs on each row when the list is displayed. It does appear more than once in the list; but never more than once per scheduled date and / or per job. Any suggestions?
Thanks in advance.
 
I really don't know. Although you do need to put quotes around the {bw_projects___id} placeholder to avoid errors when it's empty.

Have you tried doing a var_dump() of $arraylistScheduled in both places?

-- hugh
 
Thanks for the tip, Hugh. I'm glad u suggested to var_dump the array because it showed that my included PHP file may still have issues. So, the array result lists only 1 employee per date & job. So, now I'm not sure what may be the issue. My SQL statement seems correct & should list more; per the following var_dump((string) $query);exit;.
Code:
string(117) " SELECT fid_employee,name,fid_project,scheduled_date FROM `bw_scheduledlabordates` WHERE `scheduled_date` = CURDATE()"
Any suggestions?
Thanks in advance.
 
Last edited:
Hi Hugh.
Yes, attached is a snippet / screenshot PhpMyAdmin (after drag drop saving a couple employees today). If I refresh my frontend page only the 2nd record is displayed on the page in its related job.
I feel like it has something to do with the code in the default display element. Is it possible for me to experiment with this code in the list template default_row.php file to repeat it per row on refresh (instead of within the default display element settings)? If so, how?
Thanks in advance, Hugh.
 

Attachments

  • PhpMyAdmin Snippet - 6-7-16.JPG
    PhpMyAdmin Snippet - 6-7-16.JPG
    48 KB · Views: 196
We've pretty much exhausted what I can do on a standard sub. If you want to take out a Pro sub, I can devote some more time to it. Sorry, but I have to put a limit on custom coding assistance, otherwise I can't pay my rent.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top