in Education by
I have a controller action as follows public function reportcommentAction() { $comment_id = $this->getRequest()->comment_id; $blockedCommentTable = new Application_Model_DbTable_BlockedComments(); $blockedCommentTable->blockComment($comment_id, $this->user_id); } which makes a call to the blockComment() dbTable model which looks like this class Application_Model_DbTable_BlockedComments extends Zend_Db_Table_Abstract { protected $_name = 'blocked_comments'; public function blockComment($comment_id, $blocked_by) { if (!empty($comment_id) && !empty($blocked_by)) { $data = array( 'comment_id' => $comment_id, 'blocked_by' => $blocked_by ); $this->insert($data); exit; } } For some reason, I need that exit; at the end. Without it I get 2 records inserted instead of just the one as expected. I have 3 fields in the blocked_comments table, i.e. id, comment_id and blocked by. With the exit statement in place I get a record with values 1, 21, 1 as expected. Without the exit statement I get an extra record with values 2, 0, 1 for some reason. I have the same code ( without the superfluous exit) working in other parts of my code and I have no idea what is going on here. 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
The second time round the Request_Uri reports /us/account/report-comment/default.appcache?v=1 Remove the manifest attribute in the main HTML tag (right at the top) to get rid of the second call. Zend's application routing seems to be kicking in instead of serving the static file. This could be because the file does not exist or might exist on a different path.

Related questions

0 votes
    DROP TYPE Position; CREATE OR REPLACE TYPE Position AS OBJECT (longitude NUMBER(11,7), lattitude NUMBER(11, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I have batch of user accounts and every user account's password is not crypted.I want to insert to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am trying to input text into the text box in 'www.google.com' and though it says the text ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    When I insert the details in form and click on insert button, it shows "User has been added successfully ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    When I insert the details in form and click on insert button, it shows "User has been added successfully ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    When I insert the details in form and click on insert button, it shows "User has been added successfully ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    Registering members and allowing them to login (updating tables etc) all worked fine up until I made this change recently. ... , make the UserLevel 'Member'? Code for signing up:...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I have a Fragment inside of my MainActivity that contains a RecyclerView being populated by a RecyclerView.Adapter ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    There is no summary available of the big O notation for operations on the most common data structures ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    There is no summary available of the big O notation for operations on the most common data structures ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I think the direct answer to the question is 'No' but I'm hoping that someone has written a real ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I have multiple set of data to insert at once, say 4 rows. My table has three columns: Person, Id and ... a single SQL statement? Select the correct answer from above options...
asked Jan 26, 2022 in Education by JackTerrance
0 votes
    I have multiple set of data to insert at once, say 4 rows. My table has three columns: Person, Id and ... a single SQL statement? Select the correct answer from above options...
asked Jan 26, 2022 in Education by JackTerrance
...