HI there, I would like to generate a table filled with the result of
an sql command to get a report about stored  data.

My query in SQL is like this:
$MyQueryAnreisen="SELECT distinct BP.AnreiseDatum AS AN,
BP.AbreiseDatum AS AB,RQ.name AS ANF, RQ.AnzahlErwachsene AS AnzE,
RQ.AnzahlJugendliche AS AnzJ, RQ.AnzahlKinder AS AnzK, BS.name AS BK,
LS.Zimmernummer AS Zimmer,RQ.meal0_id, RQ.meal1_id, RQ.meal2_id,
concat( CS.name, ': ', CS.Firma, ': ', CS.Vorname, ', ', CS.Nachname )
AS Kunde FROM `booking_positions` AS BP, `bookings` AS BS, `lodgings`
AS LS, `customers` AS CS, `requests` AS RQ, meals as MS WHERE 1 AND
bs.id = bp.`booking_id` AND `lodging_id` = LS.id AND BS.customer_id =
CS.id AND RQ.id = BS.request_id ORDER BY AN";


current I do:

 if (!mysql_connect("localhost", "xxx", "pwdpwdpwd")) {
    die ("Verbindung zum Server fehlgeschlagen.");
  }
  if (!mysql_select_db("mydatabase")) {
    die ("Datenbank nicht gefunden.");
  }
$read_cursor = mysql_query($MyQuery);
  while($result = mysql_fetch_array($read_cursor)) { echo
$result[xx] ... }


Now I want a less dumb way to get the data from my db and output it in
a view.
Is there a way to pass my $result to the $html->tableCells() helper or
even better, how to get the result using the find() and then pass it
to $html->tableCells?

Thanks in advance

Michael

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to