[thelist] reworded MySQL query insert and back again

rudy r937 at interlog.com
Tue Feb 11 11:49:01 CST 2003

hi andrew

ah, the cart temp table

okay, you shoulda said that at the beginning   ;o)

you can either store the colour and size at the time of adding the row to
the cart, and this is done with a join, or else you must do a join when
selecting rows from the cart for display, so that the colour and size names
are displayed instead of their ids

which would you rather do?  i suspect you want the former, because you said
"to get 'green' inserted instead of 3"

the argument for the second approach is that by not doing a join on every
insert, the insert is faster, and when "display all items in cart" is done,
it's one join for all items

i would do the latter but it's up to you

show me your insert statement to add a row to the temp table


More information about the thelist mailing list