Jump to content

nazca

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Posts posted by nazca

  1. I am not saying Mysql can't, but need to know how mysql can help me to do it. When you input data into mysql it does not automatically alphabetize the restaurants for me. What it does is attached the next ID number to the next restaurant I put in and keeps the ID order correct.
  2. I have over 1000 restaurants with an ID attached to each.  The ID is the primary key and not the auto-increment assigned by mysql.
    I cannot order by restaurant_name, because of how the data is accessed and displayed -- confusing and wish it was that easy.
    I have to first re-set the restaurant-names in alpha order in the database itself and than re-set the ID's to match so that Pizza Hut does not come before Burger King for example.  I have tried to export the data to csv and csv excel, but the error i get everytime is illegal statement terminator or something of that sort.
    My only option is to re-set this table, but have no idea how.  I also tried SQLyog, but guess what... phpmyadmin will not allow it.

    Hope you can help....
  3. I have entered restaurants into my database by city to speed the process up, but when I find another restaurant later and put it with the same city
    it comes later and not in-order by name. Since i cannot order by name due to complexities, how can I re-assign the id numbers in my database so that
    the restaurants are displayed alphabetically correctly within each city.  I can do a script each time for each city does not bother me.  I want to keep my data of course.  Hope you can help and thanks.
  4. [img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /] I need help, I am trying to send a php email as an html email. Below is part of the code
    and $orderText represents the actual content.

    I am trying to place a three row table with color sent to the customer's email.
    The first row is the name, second row the content, and third link back to my site.
    How do send this using php.... I tried reading the tutorial, but over my head...
    Tried to change the content-type to text/html or text/multipart and still no luck.

    Please help..........


    if($bSendEmail){
    $headers = "MIME-Version: 1.0\n";
    $headers .= "From: " . $sEmail . " <" . $sEmail . ">\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
    //$headers .= "To: " . $sEmail . " <" . $sEmail . ">\n";
    mail($sEmail, $xxOrdStr, $orderText, $headers);
    }
    // And one for the customer
    $headers = "MIME-Version: 1.0\n";
    $headers .= "From: " . $sEmail . " <" . $sEmail . ">\n";
    //$headers .= "To: " . $custEmail . " <" . $custEmail . ">\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
    mail($custEmail, $xxTnxOrd, $xxTouSoo . "\n\n" . $orderText, $headers);
  5. Hope this is better explanation than before.... big ooops [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]

    Here is the following code I am using now.
    This table displays the following heading first:

    Name Description Price

    Under the heading the query displays all the food items ordered by sectionOrder for a particular restaurant. This is fine, but I want to be able to print category names with its corresponding food items under it such as appetizers, salads, main course, etc... So the food menu would say :

    Appetizers
    Quesadilla great mexican dish $3.99
    Wings 10 drumsticks $6.99
    Salads
    Chef fresh greens $6.99
    Caesar romaine greens $7.99
    Main Course
    etc, etc, etc

    The code below just displays all the food items from a particular restaurant ordered by section:
    Quesadilla " "
    Wings " "
    Chef Salad
    Casear Salad
    etc.


    You can imagine if the menu is huge how annoying it would be to find a salad, or main course....

    <table width="750" border="2" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
    <tr>
    <td>
    <?php
    include "admin/db_conn_open.php";


    $query = mysql_query("SELECT pName, pDescription, pPrice, pSection, sectionID, sectionOrder, sectionName FROM products, sections WHERE pSection=sectionID ORDER BY sectionOrder");

    print ("<tr>");
    print ("<td width='200' >Name</td>");
    print ("<td width='490' >Description</td>");
    print ("<td width='60' >Price</td>");
    print ("</tr>");

    while ($row = @mysql_fetch_array($query))
    {
    $variable1=$row["pName"];
    $variable2=$row["pDescription"];
    $variable3=$row["pPrice"];

    //table layout for results

    print ("<tr>");
    print ("<td width='200' >$variable1</td>");
    print ("<td width='490' >$variable2</td>");
    print ("<td width='60' >$$variable3</td>");
    print ("</tr>");
    }
    ?>
    </td>
    </tr>
    </table>


  6. My first posting, YEAH!!

    How would you create the following from MYSQL:

    Appetizers
    Wings
    Potato Skins
    Soup
    Salads
    Ceasar
    Chef
    Chicken Ceasar
    Main Meals
    Steak
    Prime Rib

    .... Until all the categories and food items are complete and in their right category...
    I want all appetizer foods under the appetizer heading and so forth.
    I do not know how many categories there are with different menus so I cannot
    make separate query calls.... I know I have to use while loops, but I am having problems
    repeating the category name than food item than category name than food item. It does not
    do it once for each category.... I figure COUNT AS will come into play... but I am lost on this one

    Hope you can help....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.