Welcome Guest, Not a member yet? Register   Sign In
using active record (delete)
#7

[eluser]kikz4life[/eluser]
it worked! haha., thanks a many cahva.. Smile

also could you help me about using the CI active record update

Code:
case $crudConfig['update']:
                $sql = 'update '.$crudTableName.' set ';
                foreach($crudColumns as $key => $value){ $updateArray[$key] = $value.'='.$crudColumnValues[$key]; };
                $sql .= implode(',',$updateArray);
                $sql .= ' where role_id = '.$crudColumnValues['id'];
                mysql_query( $sql );
                break;

also how can i rewrite this part of the code to CI
foreach($crudColumns as $key => $value){ $updateArray[$key] = $value.'='.$crudColumnValues[$key]; };
                $sql .= implode(',',$updateArray);

for the update i've read the manual, but the above code seems a little more complex for me. Also i would like to ask the differences of => to =. From my thoughts "=>" means of the array and for "=" will return strings. Am i right? Sorry for this Big Grin.


Messages In This Thread
using active record (delete) - by El Forum - 12-28-2009, 03:07 AM
using active record (delete) - by El Forum - 12-28-2009, 03:41 AM
using active record (delete) - by El Forum - 12-28-2009, 04:31 AM
using active record (delete) - by El Forum - 12-28-2009, 07:57 PM
using active record (delete) - by El Forum - 12-28-2009, 08:18 PM
using active record (delete) - by El Forum - 12-28-2009, 09:14 PM
using active record (delete) - by El Forum - 12-28-2009, 11:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB