| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | mysql statement help Hey, I am running OSC and I need to issue a MYSQl statement to the effect of: products_model = products_id ONLY if the products_model field is blank. In other words, if there is ALREADY a product model, it should be left alone. If there is NOT one already then it should be set to the products_id. Does any one have a suggestion of how to do this? thanks a bunch
__________________ Sincerely Mike Kelly |
| |
| | #2 (permalink) |
| NamePros Member | update table_name set products_model = products_id where products_model is null or depending on what you consider blank update table_name set products_model = products_id where products_model = ''
__________________ Christmas FAQ | Hussein Trial Blog | News for developers | Find your IP address | Anti-Spyware resource | The Interweb | Halloween FAQ | sweetgifts.us | lqfp.com |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HOWTO: Install the Apache Web Server, Perl, PHP, and MySQL on Windows | deadserious | Webmaster Tutorials | 96 | 05-27-2007 01:24 PM |
| Great Scripts for Sale With Resale Rights! | Zeeble | Scripts For Sale | 20 | 01-04-2006 01:39 AM |
| MySQL Tips | shahid_146 | Webmaster Tutorials | 4 | 10-18-2005 12:53 PM |
| Tutorial: How to Install Apache2 MySQL and PHP on Windows | deadserious | Webmaster Tutorials | 35 | 09-21-2005 09:46 PM |
| Tutorial: Getting Started With MySQL (The Basics) | deadserious | Webmaster Tutorials | 3 | 04-18-2004 01:17 PM |