NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page mysql statement help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 12-14-2005, 11:07 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Feb 2004
Posts: 650
teclance is on a distinguished road
 



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
teclance is offline  
Old 12-14-2005, 11:11 AM   #2 (permalink)
sjp
NamePros Member
 
sjp's Avatar
Join Date: Oct 2005
Location: Andromeda
Posts: 136
sjp is on a distinguished road
 



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 = ''
sjp is offline  
Old 12-14-2005, 11:22 AM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Feb 2004
Posts: 650
teclance is on a distinguished road
 



thanks a bunch for that I will give it a shot.
__________________
Sincerely
Mike Kelly
teclance is offline  
Closed Thread


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 02:24 PM
Great Scripts for Sale With Resale Rights! Zeeble Scripts For Sale 20 01-04-2006 02:39 AM
MySQL Tips shahid_146 Webmaster Tutorials 4 10-18-2005 01:53 PM
Tutorial: How to Install Apache2 MySQL and PHP on Windows deadserious Webmaster Tutorials 35 09-21-2005 10:46 PM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 02:17 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:45 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger