Greetings, I'm having a real problem with this one, so I hoped I could seek some guidance from the guru's inhabiting the mailing list, and then hopefully in the future I can offer some assistance myself... (Skip down four paragraphs if in a hurry!)
My wife, who always wanted her own bookshop, decided to try selling online instead, right now through the services of half.com - so far she's doing well. However, she's making enough sales where it'll soon be time to have her own site instead. To accomplish this, I figured it would be easier, rather than scanning the UPC in from each book and starting from scratch again, to grab information from half.com's current list, then we expand ourselves from there. We also have the services of a wonderful program called ReaderWare, available at www.readerware.com - I don't normally plug peoples' products, believe me, but this has been invaluable. Regardless, I've ended up with two tables - one containing the information I got from half.com (ISBN, UPC, price, condition, name, author), and one from Readerware (ISBN, name, author, subject, etc). Now joining those two tables together to end up with the perfect listing - which would contain the ReaderWare complete details coupled with the half.com price and condition - wouldn't be too difficult at all. I'm having trouble because both tables contain multiple listings of some books (with different prices and conditions), with the only field related between them being the ISBN, the other fields are not guaranteed to match every time. So, before I bore you all to death, rather than write a long complicated PHP script to figure this all out, I figured that MySQL would have no problem joining these two tables together and producing the perfect output table for my needs. It's 3:30am, and my contacts are blurring up on me.... I'm stumped! Unfortunately, joins aren't my strongest point. I've tried a variety of different SELECT statements, and usually end up with multiple listings as they are supposed to be, but all with the same price, for example. Help! I would include a few of my failed SQL statements, but I don't want to get laughed at. :) To conclude... two tables (books and half), both contain an ISBN field (books_isbn and half_isbn), the first table will comprise the name (books_name), author (books_author), and description (books_description), the second table will comprise the price (half_price) and condition (half_condition), and the books table will contain multiple entries with the exact same information - apart from the id number, of course, while the half table contains multiple entries with the same ISBN, but different conditions and prices. Sorry for the long version, but I figured a detailed explanation would probably help. missysbooks.com may get there someday! Thanks for your time, and I'd appreciate a CC to my own email address ([EMAIL PROTECTED]) as well as to the mailing list. Have fun, Rob Beckett. www.subwolf.org www.blueprinthosting.com www.opticblue.com --------------------------------------------------------------------- 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