Pls Help !

2002-12-19 Thread Axis Computers
I'm trying to figure out how can I do this:

I'm designing a mysql db for a delivery service, and I encounter a problem
each item delivered has a code associated
and it also does some querys in other associated tables, I mean:

Prod ID = 11   Prod = PizzaRecipeID=01   REcipe has the ingredients
and each time a prod is ordered all the ingredients are added to a day
total.

I mean the employee enters the code for Pizza, then it adds the pizza
individual ingredients to the day total, there are also combined orders, my
problem is which is the best way to create an associated table with each of
the item ingredients (they have to be editable), because they have unique
recipes that are modifiable.

I mean

Products  Recipes

-
ProdIdName  ... (other fields) RecIDDesc
01Pizza  11
Pizza

and here is my problem

RecipesDesc

RecId  Item   qtyestcost  
 11  Flour  
 11  Tomato  

each item must be edited so RecId will be repeated for many times, so by the
end of the day if I want to know how much flour was spent I will have the
same ingredient repeated all over in different recipes, which is the best
way to overcome this ?

I couldn't figure it out,


Thank you,

Ricardo Fitzgerald
Web Developer

__ Omni
ICQ#: 37031810 Current ICQ status: + More ways to contact me
__


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: [PHP] Questions regarding inserting and updating data into a MySQL db

2002-09-10 Thread Axis Computers

Thanks for the tip I will try that, I'm still learning MySQL and PHP,
although I did a couple of complex applications, there are some
techniques that still are 'obscure' to me.

Regards,

Ricardo Fitzgerald
AXIS Computers
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Axis Computers [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; PHP [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 7:24 PM
Subject: Re: [PHP] Questions regarding inserting and updating data into a
MySQL db


 You should search for some SQL tutorials on the Web.

 What it sounds like you are looking for is the update SQL statement
 which modifies an existing row (for your second form, for example).
 Thus, you insert the row to create it (which assigns the key using the
 auto increment), then update that row to make any modifications you
 need to after that.

 Happy hacking.

 Chris

 Axis Computers wrote:

  I'm developing a web application that uses forms for user input and
  then after each form is filled shows something like Welcome Bob to our
  site ... bla. bla... inserts data in a table and on the same page
  continues with the rest of the data, and goes to another form and so on.
 
  I have no problems inserting the data from the first form in the
  table, display the personalized message, and then connect to the mySQL
  db, my problem is some fields in the table which must be filled are
  null in this first instance, and then on the second form they are
filled,
  but my I donĀ“t know how can I fill the gaps and leave all the data in
  one row, because the first field auto increments, and I'm worried the
  data instead of filling one row spreads accross two or three.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php