Error/Warning - MySQL
#2

Just a quick reminder, this isn't an SQL support forum.

The errors are pretty straight forward. You're adding columns to a table even though they already exist. This is the case when you have a bunch of the queries below after creating the table (table including all the columns):

PHP код:
ALTER TABLE `table_nameADD COLUMN `column_namedatetype
The 'field not found' errors are probably because you're doing something like:

PHP код:
    #define CONSTANT_VALUE    100
    
for(new 0CONSTANT_VALUE++) {
        
variable cache_get_field_content_int(i"ID");
    } 
Note how you are not taking the amount of returned rows in consideration. A better way to approach this is to limit to loop to the amount of rows that are returned:

PHP код:
    for(new 0cache_get_row_count(); j++) {
        
variable cache_get_field_content_int(i"ID");
    } 
I could be wrong about that as I've never encountered such errors before (probably because I always take the amount of rows in consideration).

EDIT: it returns a different error to me when trying to access a row that doesn't exist. So the explanation above probably has nothing to do with the error you're getting unless you're using an older version of MySQL or ORM (I'm unfamiliar with ORM).
Reply


Messages In This Thread
Error/Warning - MySQL - by Avino - 06.04.2016, 11:20
Re: Error/Warning - MySQL - by AndySedeyn - 06.04.2016, 11:38
Re: Error/Warning - MySQL - by Avino - 06.04.2016, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)