Jump to content

koopkoop

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

koopkoop's Achievements

Member

Member (2/5)

0

Reputation

  1. Hmmm. I think this is the answer: http://dev.mysql.com/doc/refman/5.0/en/query-log.html Can anyone confirm there isn't a better method?
  2. "And the easiest thing you can do is here is log all data written to the database" ^ How exactly would I do that? That's another method that will work too. Anyone?
  3. Print queries isn't practical because the shopping cart is incredibly modular. There's a lot of modules involved which each contribute their small portion of info which makes up the entire info set for a product. It just isn't practical to trace across the hundres of files which comprise all the modules involved in the process. I really need software to do this. My current solution is using WinMerge to compare text file backups between the two database states. It works, but is very slow because of all the manual labour involved.
  4. Is there a piece of software out there that can monitor a mysql database and give some kind of output as to what changes have been made? I'm working with a PHP shopping cart (Magento) that has very poor product import support. To get around this, I'm writing my own product import script to inject products, and all of its associated values, directly into the database. However, I need to know exactly how the shopping cart is storing product information. To figure this out, I want to take a "snapshot" of the database before I add a product, then add a product through the shopping cart and then compare the database against the snapshot to see exactly where the shopping cart placed the values.
  5. How do I debug a full website? I'm working on an eCommerce site and there's a lot of variables shared between pages. Therefore, I can't simply point the debugger to an individual page and expect the page to debug because all the variables it depends on are missing. For example, a page showing all the details for a single product relies heavily on all the data that was passed to it from the page that showed you the entire product collection. How would I go about debugging the product detailed info page? I'm using PDT, but will switch for this type of functionality.
  6. If I have a table like so: TABLE TestTable ID / Name / Age ------------------- 1 / Greg / 14 2 / Mary / 45 3 / Bob / 16 Is there an SQL statement that'll return the name of each column and it's numeric index in the table (Eg Id=0,Name=1,age=3)? I know I can do a SELECT *.....then use MYSQL_FETCH_ARRAY to grab the associated numbers, but I was hoping for a more elegant solution.
  7. Is there another way of writing a query that would only affect the itemnumbers of interest?
  8. Thanks for the pointers on using the generic 'price' statement. Does that mean I can do something like below to increase the existing price value for that particular itemnumber? eg: UPDATE `products` SET `price`= CASE WHEN `itemnumber`='PL1222' THEN 'price' + 3.00 WHEN `itemnumber`='YX1222' THEN 'price' * 4 ELSE THEN `price` END WHERE `itemnumber`IS NOT NULL Yeah, I under stand the concern over the dollar signs. My actual db doesn't have them.
  9. UPDATE products SET CASE WHEN itemnumber = PL1222 THEN price='$5.00' WHEN itemnumber = YX1222 THEN price='$6.00' Would this work?? Can someone please correct?
  10. How would I update the price of itemnumbers PL1222 to $5.00 and YX1222 to $6.00, in one query? Table:Products Itemnumber| Price ---------------------- PL1222 | $3.40 AX1222 | $4.45 YX1222 | $2.31
  11. Update only PL1222 to $5.00 and YX1222 to $6.00, in one query.
  12. ^ OK. Look at my original post. How would I update prices to a new value on only PL1222 and YX1222 with ONE query.
  13. I know there's a way though because I found something close to what I'm trying to accomplish: UPDATE test SET test_order = case test_id when 1 then 2 when 2 then 3 when 3 then 1 end WHERE test_id in(1,2,3) Hopefully, this helps clear things up more than confusing things further.
  14. ^ Thanks, but that solution is using one query for every update. If I used your example to update 30 records, I would have used 30 queries. I'm looking for a query statement that will allow me to update 30 records with one query.
×
×
  • 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.