Project

General

Profile

« Previous | Next » 

Revision 1486

Added by DarkViper over 13 years ago

database::field_modify() there was a bug to fix
all other files: fixed SQL-statements to SQL-strict

View differences:

class.database.php
214 214
	public function field_modify($table_name, $field_name, $description)
215 215
	{
216 216
		$retval = false;
217
		if( $this->field_exists($field_name, $table_name) )
217
		if( $this->field_exists($table_name, $field_name) )
218 218
		{ // modify a existing field in a table
219
			$sql  = 'ALTER TABLE `'.$table_name.'` DROP `'.$field_name.'`';
219
			$sql  = 'ALTER TABLE `'.$table_name.'` MODIFY `'.$field_name.'` '.$description;
220
			$retval = ( $this->query($sql) ? true : false);
221
			$this->set_error(mysql_error());
220 222
		}
223
		return $retval;
221 224
	}
222 225

  
223 226
/*
224 227

  

Also available in: Unified diff