Hallo zusammen,
Ich möchte gerne folgende Zeile in SQL Code übersetzen und hab so meine Schwierigkeiten:
|
@bill_export_count = Bus::Case.count(:all, :conditions => [ "bus_id IS NULL AND (result_report_printed_at IS NOT NULL AND result_report_printed_at < now() - INTERVAL ? HOUR ) AND classification_id IS NOT NULL", 156 ]) |
Gibt für mich folgenden SQL Code:
1 2 3 4 5 6
|
SELECT * FROM `cases` WHERE `bus_id` IS NULL AND `result_report_printed_at` IS NOT NULL AND `result_report_printed_at` < "2010-07-23 11:06:54" AND `classification_id` IS NOT NULL |
Ist das so richtig? Und was hat die "156" am schluss des ruby codes zu bedeuten?
Danke für eure Hilfe und LG
MacPit