in Education by
Am trying to perform an update and nothing seems to work. It has something to do with my callback I suppose as the update works well when the callback is disabled. This is my try block. try{ $updatestat=NULL; $updateresult=NULL; $id = Arr::get($_POST, 'id'); $scode=trim(Arr::get($_POST, 'stationcode')); $sname=trim(Arr::get($_POST, 'stationname')); $dsupdate = new Model_Dstations($id); $dsupdate->scode = $scode; $dsupdate->sname = $sname; $validation = new Validation($_POST); $validation->rule('scode', array($dsupdate, 'check_updatecheck' ), array( ':validation', ':value',':field',$id )); $validation->rule('sname', array($dsupdate, 'check_updatecheck' ), array( ':validation', ':value',':field',$id )); $result['sql']=$dsupdate->save($validation);} JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Your code looks like a complete mess. Try this: $dsupdate = new Model_Dstations($id); $validation = new Validation($_POST); $validation->rule('scode', array($dsupdate, 'check_updatecheck' ), array( ':validation', ':value',':field',$id )); $validation->rule('sname', array($dsupdate, 'check_updatecheck' ), array( ':validation', ':value',':field',$id )); if ($validation->check()) { $dsupdate->scode = $scode; $dsupdate->sname = $sname; $dsupdate->save(); }

Related questions

0 votes
    Which of the following can be used as a primary key entry of the instructor relation. (a) DEPT_NAME ... in section Database Systems Design and Implementation of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    I am trying to use design support library. Gradle dependencies are as follows dependencies { compile 'com. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    I am trying to use design support library. Gradle dependencies are as follows dependencies { compile 'com. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I am trying to use design support library. Gradle dependencies are as follows dependencies { compile 'com. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    In a __________ index, an index entry appears for only some of the search-key values. (a) Dense (b) ... from Ordered Indices in portion Indexing and Hashing of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    I am getting empty row on following sql SELECT * FROM flyers WHERE fId='6' AND 'userId'='400' ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    Which algorithm uses equality comparison on a key attribute with a primary index to retrieve a single ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I am at my wit's end! Trying to auto upgrade to Wordpress 3.3 and its not working. I have tried ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    I am working on a voting table design using Postgres 9.5 (but maybe the question itself is applicable ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    I am working on a voting table design using Postgres 9.5 (but maybe the question itself is applicable ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How to reshape data from long to wide format (12 answers) Closed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 5, 2022 in Education by JackTerrance
0 votes
    5. Which key defines a relationship between two tables? (a) Primary key (b) Foreign key (b) Secondary key (d) ... Full form of RDBMS is Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    6. A primary key is a . of unique values. 7. Linking tables are created to facilitate DBMS uses the ... . among two tables. 8 Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    The primary key must be (a) Unique (b) Not null (c) Both Unique and Not null (d) Either Unique ... and Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Which one of the following attribute can be taken as a primary key? (a) Name (b) Street (c) Id ... and Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
...