Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:28:16+00:00 2026-06-10T01:28:16+00:00

I tried to create a module in SE4, and followed a tutorial ( How

  • 0

I tried to create a module in SE4, and followed a tutorial (How to create a model and get data from MySQL to display in SE4) but can’t seem to make my database output print out in my view. Here’s code:

Database dump, i used engine4_ prefix, as all my other tables are named that way

-- phpMyAdmin SQL Dump
-- version 2.11.11.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 14, 2012 at 11:32 AM
-- Server version: 5.5.23
-- PHP Version: 5.3.14

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `xyzeljubko`
--

-- --------------------------------------------------------

--
-- Table structure for table `engine4_zki_pitanja`
--

CREATE TABLE IF NOT EXISTS `engine4_zki_pitanja` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `test` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `engine4_zki_pitanja`
--

INSERT INTO `engine4_zki_pitanja` (`id`, `test`) VALUES
(1, 'Stringcina');

My module is named zki, and here are two models I created, /Zki/Models/pitanje.php

<?php 
    class Zki_Model_Pitanje extends Core_Model_Item_Abstract
    {
        protected $_owner_type = 'user';
    }
?>

and model Zki/Models/DbTable/pitanja.php (plural)

<?php 
    class Zki_Model_DbTable_Pitanja extends Engine_Db_Table
    {
        protected $_rowClass = 'Zki_Model_Pitanje';
    }
?>

as of controller, here is Zki/Controllers/pitanjeController.php

<?php 

    class Zki_PitanjeController extends Core_Controller_Action_Standard
    {
        public function indexAction()
        {
            // default action
        }

        public function viewtestAction()
        {
            // uzmi tabelu
            // getDbTable(TABLENAME, MODULENAME);
            $table = Engine_Api::_()->getDbTable('pitanja', 'zki');

            // neki filtering, select i to
            // docs: http://framework.zend.com/manual/en/zend.db.select.html
            $select = $table->select(); // ->where("user_id = $id", 1)->order('creation_date');

            // dohvati podatke
            $result = $table->fetchAll($select);
            $this->view->pitanja = $result;
        }
    }
?>

and finally my view Zki/Views/scripts/pitanje/viewtest.tpl

<?php 
    foreach($this->pitanja as $pitanje) {
        echo 'Id pitanja: ' . $pitanje->id . ' and test string is ' . $pitanje->test . '. Endline. <br/>';
    }
?>

But doesn’t seem to work. I’m not sure how to debug this problem, but seems to be trivial. Can anyone help me realize where I wen’t wrong on this one?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:28:18+00:00Added an answer on June 10, 2026 at 1:28 am
    1. Have you made id column primary?
    2. The file names should start with capital letter.
    3. Check log (control panel > stats > log browser) for errors.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried create this table, but nothing I have tried works from FKs.
I have followed the tutorial located in the wiki: http://www.magentocommerce.com/wiki/5_-_modules_and_development/payment/create-payment-method-module The module is visible
I was trying to create a payment module for opencart. When i tried to
This is a homework question, I got the basics down, but I can't seem
I need to get value from json. It works perfectly on returned objects, but
I'm trying to create a CLI with the argparse module but I'd like to
I know how to create a module for Joomla 1.6. But I have heard
I have tried to find how to create DLL-s on linux using google, but
Tried to create a mobile navigation using dataview or outline and the view renders
I tried to create base controller and write in it: Ext.define('My.Users.controller.Role', { extend :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.