Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 03-22-2005, 07:51 AM
TeKBuzz's Avatar
TeKBuzz TeKBuzz is offline
Senior Member
 
Join Date: 11-12-03
Location: Ohio
Posts: 377
iTrader: 0 / 0%
Watching form

Hey, I have a form to update information in the database, is it possible to check what's changed without pulling the original information out of the database first? so that I can just update what needs updating? or would it be better to just update all the fields, whether they changed or not?
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 03-22-2005, 09:10 AM
Thermit's Avatar
Thermit Thermit is offline
Member
 
Join Date: 02-14-05
Posts: 54
iTrader: 0 / 0%
Unless you are talking about an unusual case, I don't think it will be a problem to reset a few fields to their current value.

It would probably be slower, and definately more work to do otherwise.
 
Reply With Quote
  #3  
Old 03-22-2005, 10:35 AM
littleFella's Avatar
littleFella littleFella is offline
Senior Member
 
Join Date: 06-20-04
Location: Ontario
Posts: 1,756
iTrader: 0 / 0%
Quote:
Originally Posted by TeKBuzz
Hey, I have a form to update information in the database, is it possible to check what's changed without pulling the original information out of the database first? so that I can just update what needs updating? or would it be better to just update all the fields, whether they changed or not?
If your database system has triggers and stored procedures support, then you can use that to what you want (and quite a bit more).

Postgresql and Firebird have this functionality. Not sure if the free version of mySQL does. But then, the free version of mySQL is not really a database system, but a glorified flat file system with SQL functionality.

For mySQL you're likely better off just updating all the records. I would be surprised if mySQL performed any writes on records that didn't change.
 
Reply With Quote
  #4  
Old 03-22-2005, 02:40 PM
sim sim is offline
Banned
 
Join Date: 01-23-04
Posts: 1,098
iTrader: 0 / 0%
Quote:
Originally Posted by littleFella
But then, the free version of mySQL is not really a database system, but a glorified flat file system with SQL functionality.
.
all databases are technically flat file based.
 
Reply With Quote
  #5  
Old 03-22-2005, 02:46 PM
littleFella's Avatar
littleFella littleFella is offline
Senior Member
 
Join Date: 06-20-04
Location: Ontario
Posts: 1,756
iTrader: 0 / 0%
Quote:
Originally Posted by sim
all databases are technically flat file based.
No, they aren't.
 
Reply With Quote
  #6  
Old 03-22-2005, 07:30 PM
TeKBuzz's Avatar
TeKBuzz TeKBuzz is offline
Senior Member
 
Join Date: 11-12-03
Location: Ohio
Posts: 377
iTrader: 0 / 0%
Is there a non-free mysql? If so how would I know which one I got... I just got a server that a friend recommended...

Thanx for the advice though, I'll be done with it tomorrow... I'll post it so yall might tell me how to make it more secure etc.
 
Reply With Quote
  #7  
Old 03-22-2005, 07:47 PM
littleFella's Avatar
littleFella littleFella is offline
Senior Member
 
Join Date: 06-20-04
Location: Ontario
Posts: 1,756
iTrader: 0 / 0%
Quote:
Originally Posted by TeKBuzz
Is there a non-free mysql? If so how would I know which one I got... I just got a server that a friend recommended...
Yes, there is. If you use mySQL for commercial purposes then you have to pay license fees. You have to pay them even if you distribute an application without mySQL, but your application cannot function without it.

Version 5 will make mySQL a real database. It will loose some speed of course. It is one of the fastes now only because of the lack of some features critical in corporate environment, ACID compliance, various types of locking, stored procedures etc.
It looks that the license for version 5 may be a little more restrictive. Movement to other databases (posgresql, firebird) is noticeable lately.
 
Reply With Quote
  #8  
Old 03-22-2005, 08:37 PM
TeKBuzz's Avatar
TeKBuzz TeKBuzz is offline
Senior Member
 
Join Date: 11-12-03
Location: Ohio
Posts: 377
iTrader: 0 / 0%
So, since I don't run sites that earn money I don't have to pay anything right? or is it like I'm paying because the company I get service from has to pay? I don't think I understand... I've never paid for mysql or heard of anyone that does.
 
Reply With Quote
  #9  
Old 03-22-2005, 09:23 PM
littleFella's Avatar
littleFella littleFella is offline
Senior Member
 
Join Date: 06-20-04
Location: Ontario
Posts: 1,756
iTrader: 0 / 0%
Quote:
Originally Posted by TeKBuzz
So, since I don't run sites that earn money I don't have to pay anything right? or is it like I'm paying because the company I get service from has to pay? I don't think I understand... I've never paid for mysql or heard of anyone that does.
You got it right. If you are leasing web space from some hosting company you are safe. At least for now.
 
Reply With Quote
  #10  
Old 03-23-2005, 04:50 AM
TeKBuzz's Avatar
TeKBuzz TeKBuzz is offline
Senior Member
 
Join Date: 11-12-03
Location: Ohio
Posts: 377
iTrader: 0 / 0%
Alright man I appreciate you telling me. Espcially since I really didn't understand what you meant at first ^_^
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trauma - watching vs experiencing John Scott Forum Lobby 13 10-20-2007 09:43 AM
watching WMV files on OSX with FF JamieJelly Tech Talk 2 09-26-2006 01:28 PM
things to be watching for on my site?? gfriedm1 Google Forum 5 06-17-2006 12:05 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:08 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC