chrometweaks.org

Is there a good and reliable web iPage hosting service available which supports Struts 2 framework?

Click Here To View All Answers...


Got a question, hope someone can answer... Is there a good and reliable web iPage hosting service available which supports Struts 2 framework? Thanks in advance for any answer or 2. Another quick question... Howdy,.

I need to change all the current products in my database to 2004-05-15 00:00:00. I know the default before a product is added is 0000-00-00 00:00:00, but I don't want to change the default. I need to alter every product that is currently in there..

Does any know a quick UPDATE query I can pop into phpMyAdmin and change everything in products_date_added?.

Thanks in advance!.

WishX..

Comments (257)

Ye, but... you might want to make sure and wait for another person here to confirm my answer as I am not quite sure. Better yet, why don't you e-mail the iPage guys because they can give you an answer better...

Comment #1

Now I have a more refined question about the same thing... How would I change the products_date_added for all products in a specific category?.

Example:.

Books.

>Horror.

>Book 1.

>Book 2.

>Book 3.

>Sci Fi.

>Sci Book 1.

>Sci Book 2.

>Sci Book 3.

Let's say I want all the "Books" to appear to be added 05/15/2004, but I want all "Sci Books" to appear to be added 06/30/2004..

What query would I use to make that happen?.

Thanks again!.

WishX..

Comment #2

Use the same query, adding the where clause for the categories...

Comment #3

Can you give me an example? I'm pretty new at MySQL queries...

Comment #4

For example, would it be something like:.

Update products set products_date_added = '2004/05/15' where categories.categories_id = 37.

?.

WishX..

Comment #5

Update products set products_date_added = '2004/05/15'.

From products, products_to_categories.

Where products_to_categories.categories_id = 37.

And products.products_id = products_to_categories.products_id.

HTH and hope it works.....

Tom..

Comment #6

So what you're saying is make a backup first?..

Comment #7

Didn't work. I got this:.

Error.

SQL-query :.

Update products set products_date_added = '2004/06/01'.

From products, products_to_categories.

Where products_to_categories.categories_id = 32.

And products.products_id = products_to_categories.products_id.

MySQL said:.

You have an error in your SQL syntax near 'from products, products_to_categories.

Where products_to_categories.categories_i' at line 2..

Comment #8

Try.

Update products, products_to_categories set products_date_added = '2004/06/01'.

Where products_to_categories.categories_id = 32.

And products.products_id = products_to_categories.products_id.

Previous syntax works well in SQL2000 and Sybase...

Comment #9

Still no good. Got this:.

Error.

SQL-query :.

Update products, products_to_categories set products_date_added = '2004/06/01'.

Where products_to_categories.categories_id = 32.

And products.products_id = products_to_categories.products_id.

MySQL said:.

You have an error in your SQL syntax near ' products_to_categories set products_date_added = '2004/06/01'.

Where products_t' at line 1..

Comment #10

I still can't seem to come up with the right query. It seems easier than it is to me. Can I get a little help from a MySQL expert please?..

Comment #11

Did I happen to mention this is for a client with a live store and I've been trying to figure this out for 2 days now?.

ANY.

Help would be greatly appreciated..

Thanks..

Comment #12

Howdy,.

I need to change all the current products in my database to 2004-05-15 00:00:00. I know the default before a product is added is 0000-00-00 00:00:00, but I don't want to change the default. I need to alter every product that is currently in there..

Does any know a quick UPDATE query I can pop into phpMyAdmin and change everything in products_date_added?.

Thanks in advance!.

WishX..

Comment #13

I just ran that and everything in products_date_added is coming up as:.

0000-00-00 00:00:00.

That didn't do the trick. Any other ideas?.

WishX.

Edit:.

Should have been update products set products_date_added = '2004/05/15'.

That worked. Thanks again!.

This post has been edited by.

Wishx.

: 30 June 2004, 20:21..

Comment #14


This question was taken from a support group/message board and re-posted here so others can learn from it.