0

I have a array of dates. For each date, I want to insert it into the where clause of a query, then store the resulting value (a count of something) into a new table.

This similar question provides an answer in php, but I need to do this strictly in mysql. Thanks in advance for your help.

EDIT: by array, I just mean a list of things. For instance, a table with one row of date values. Thanks.

Community
  • 1
  • 1
s2t2
  • 2,462
  • 5
  • 37
  • 47

1 Answers1

0

iterate the array and build your where clause?

something like:

$where = "WHERE";
foreach($date as $dates){
$where .= " AND " . $date . = " some column";
}
Stefano L
  • 1,486
  • 2
  • 15
  • 36