oscommuser_1 Posted November 15, 2005 Share Posted November 15, 2005 Hi! What a great contribution is File Upload! Notwithstanding I would like to have it bug-free as much as possible: WHAT IS THE RIGHT VALUE? In files_uploaded.sql there is the following definition for the field `files_uploaded_name`: `files_uploaded_name` VARCHAR( 64 ) NOT NULL So, `files_uploaded_name` is NOT NULL. However, in both: ReadMe.html - v.7 and joe's_ReadMe.html - v.77 there is the following definition for the same field: NAME: files_uploaded_name TYPE: varchar(64) NULL: Yes DEFAULT: NULL Hence, files_uploaded_name IS NULL with a default value of NULL!!! In sum: How is files_uploaded_name defined? NULL? or NOT NULL? Thanks in advance for making it clear! :blink: Link to comment Share on other sites More sharing options...
jefs.42 Posted November 15, 2005 Share Posted November 15, 2005 i'd go with the sql file. can't imagine why you would want an uploaded file's name to be NULL. Haven't used it, but what can you do with a file named nothing? Link to comment Share on other sites More sharing options...
oscommuser_1 Posted November 16, 2005 Author Share Posted November 16, 2005 i'd go with the sql file. can't imagine why you would want an uploaded file's name to be NULL. Haven't used it, but what can you do with a file named nothing? You might be right? if computers were as good as people about handling ambiguities. However, I know by experience than slight changes in critical values could be catastrophic soon or later. You know, like the Butterfly Effect. Let me try to explain about it even though I am not software expert, not even sql literate. What we are dealing with here is with the correct initialization of a variable and, hence, the possible values it may take. If a variable is *NOT NULL*, it means it can never take the value *NULL*. Can it? Then, when this variable is called with an unexpected default value the result could be anything, including a possible program crash. Who knows? I have done some programming in C language and seen all kind of weird stuff. In our actual case everything seems quite stable, since I have not seen much noise about the issue. So, may be this is just a minor issue. In any case, I still feel it is better to know for sure what is the intended right definition. You know, this is not a matter about what we think the variables should be but what the software expects it to be. Thank for your comment. And, in the mean time, I think that I will test performance for both alternatives. Some times this test-and-error procedure works fine. Link to comment Share on other sites More sharing options...
Guest Posted November 16, 2005 Share Posted November 16, 2005 I'm having trouble with that contrib too. Theres a thread here http://www.oscommerce.com/forums/index.php?showtopic=59589 Link to comment Share on other sites More sharing options...
oscommuser_1 Posted November 19, 2005 Author Share Posted November 19, 2005 I'm having trouble with that contrib too. Theres a thread here http://www.oscommerce.com/forums/index.php?showtopic=59589 My only, original problem was, and is, about the right value of files_uploaded_name: NULL or NOT NULL? To be or not to be? It seems NULL works fine since I have a nice and WORKING 'file upload' contribution without a crash after several tests and subsequent to giving 'write permissions' to folder uploads, at least, so the sql database does not get stuck somewhere else. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.