SQL Eintrag auslesen

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • SQL Eintrag auslesen

    Hallo,
    Ich habe hier ein script welches in oscommerce für den Ausdruck eines Paketscheins zuständig. Dieses Script soll noch erweitert werden das an der mit xxxx gekentzeichneten Stelle der custumer_name aus der Tabelle orders angezeigt wird. Kriege das irgendwie nicht richtig hin. Hier ist der Code:

    require('includes/application_top.php');

    require(DIR_WS_CLASSES . 'currencies.php');
    $currencies = new currencies();

    $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
    $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

    include(DIR_WS_CLASSES . 'order.php');
    $order = new order($oID);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

    <!-- body_text //-->
    <table width="100%" height="50" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table>
    <table width="896" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="263" height="20">&nbsp;</td>
    <td class="main" align="left" height="20" width="633">
    <?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '&nbsp;', '<br>'); ?>
    </td>
    </tr>
    </table>
    <table width="100%" height="17" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">
    <tr>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <table width="896" height="55" border="0" cellspacing="0" cellpadding="0">
    <?php
    $i = sizeof($order->totals);
    $i = $i -1;
    ?>

    <tr>
    <td width="312" height="14"></td>
    <td align="left" width="584" height="14" colspan="2">

    </tr>
    <tr>
    <td width="312" height="5">
    <p align="right"><font face="Arial"><font size="2">EUR</font></font><font size="2">
    </font>&nbsp;&nbsp; </td>
    <td align="left" width="584" height="5" colspan="2"><b>&nbsp;&nbsp;&nbsp;&nbsp;</b>
    <?php echo $order->totals[$i]['text']; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XXXX custumer_name soll hier hin!
    </tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="584" height="5" colspan="2">

    </tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="584" height="5" colspan="2">

    </tr>
    <tr>
    <td width="312" height="48">&nbsp;</td>
    <td align="left" width="584" height="48" colspan="2">&nbsp;</tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="30" height="5">

    </tr>
    <td align="left" width="554" height="5">
    <font face="Arial" style="font-size: 9pt">text</font></tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="30" height="5">

    </tr>
    <td align="left" width="554" height="5">
    <font face="Arial" style="font-size: 9pt">text</font></tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="30" height="5">

    </tr>
    <td align="left" width="554" height="5">
    <font face="Arial" style="font-size: 9pt">textr</font></tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="30" height="5">

    </tr>
    <td align="left" width="554" height="5">

    </tr>
    <tr>
    <td width="312" height="5"></td>
    <td align="left" width="30" height="5">

    </tr>
    <td align="left" width="554" height="5">

    </tr>
    </table>
    <!-- body_text_eof //-->

    <br>
    </body>
    </html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

    Danke für Eure Hilfe.

    Grüsse
    Ralph

  • #2
    toller code so ganz ohne markierungen,
    was willst Du denn wo haben???
    Beantworte nie Threads mit mehr als 15 followups...
    Real programmers confuse Halloween and Christmas because OCT 31 = DEC 25

    Kommentar


    • #3
      ungefähr in der Mitte wo XXXX steht soll aus der Tabelle orders > der cusumer_name ausgelesen und angegeben werden.
      Werde versuchen die Stelle zu markieren.
      Sorry wg. dem Durcheinander.

      Gruss Ralph

      require('includes/application_top.php');

      require(DIR_WS_CLASSES . 'currencies.php');
      $currencies = new currencies();

      $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
      $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

      include(DIR_WS_CLASSES . 'order.php');
      $order = new order($oID);
      ?>
      <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html <?php echo HTML_PARAMS; ?>>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
      <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
      </head>
      <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

      <!-- body_text //-->
      <table width="100%" height="50" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td> </td>
      </tr>
      </table>
      <table width="896" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td width="263" height="20"> </td>
      <td class="main" align="left" height="20" width="633">
      <?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?>
      </td>
      </tr>
      </table>
      <table width="100%" height="17" border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">
      <tr>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      <td width="10%"> </td>
      </tr>
      </table>
      </td>
      </tr>
      </table>
      <table width="896" height="55" border="0" cellspacing="0" cellpadding="0">
      <?php
      $i = sizeof($order->totals);
      $i = $i -1;
      ?>

      <tr>
      <td width="312" height="14"></td>
      <td align="left" width="584" height="14" colspan="2">

      </tr>
      <tr>
      <td width="312" height="5">
      <p align="right"><font face="Arial"><font size="2">EUR</font></font><font size="2">
      </font> </td>
      <td align="left" width="584" height="5" colspan="2"><b> </b>
      <?php echo $order->totals[$i]['text']; ?> [COLOR=red]XXXX custumer_name soll hier hin
      </tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="584" height="5" colspan="2">

      </tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="584" height="5" colspan="2">

      </tr>
      <tr>
      <td width="312" height="48"> </td>
      <td align="left" width="584" height="48" colspan="2"> </tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="30" height="5">

      </tr>
      <td align="left" width="554" height="5">
      <font face="Arial" style="font-size: 9pt">text</font></tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="30" height="5">

      </tr>
      <td align="left" width="554" height="5">
      <font face="Arial" style="font-size: 9pt">text</font></tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="30" height="5">

      </tr>
      <td align="left" width="554" height="5">
      <font face="Arial" style="font-size: 9pt">textr</font></tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="30" height="5">

      </tr>
      <td align="left" width="554" height="5">

      </tr>
      <tr>
      <td width="312" height="5"></td>
      <td align="left" width="30" height="5">

      </tr>
      <td align="left" width="554" height="5">

      </tr>
      </table>
      <!-- body_text_eof //-->

      <br>
      </body>
      </html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

      Kommentar


      • #4
        OffTopic:
        @derliebegott
        wie wäre es, wenn du mal die php-tags verwenden würdest?

        [php ]code[/php ] (ohne leerzeichen)

        bitte bearbeite deine beiden postings mal dahingehend.
        INFO: Erst suchen, dann posten![color=red] | [/color]MANUAL(s): PHP | MySQL | HTML/JS/CSS[color=red] | [/color]NICE: GNOME Do | TESTS: Gästebuch[color=red] | [/color]IM: Jabber.org |


        Kommentar


        • #5
          ach in der Mitte sags doch gleich
          Beantworte nie Threads mit mehr als 15 followups...
          Real programmers confuse Halloween and Christmas because OCT 31 = DEC 25

          Kommentar


          • #6
            Komme nicht klar

            Das ist jedenfalles die geanaue Stelle wo aus der Tabelle orders der custumer_name angezeigt werden soll.

            <?php echo $order->totals[$i]['text']; ?> [COLOR=red]XXXX custumer_name soll hier hin

            Kommentar

            Lädt...
            X