How show items from table

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
zabi
New Member
New Member
Posts: 7
Joined: Wed Mar 14, 2012 8:22 am

How show items from table

Post by zabi »

Hello,

At first:
1) I am a beginner in CMS MS
2) I have poor english:-(
Thank you for your understanding.

I have a problem with connecting and reading table in MySql database. Table is now in DB, where are all tables for CMS MS (it is same database).

Table name: jidelni_listek
Columns names: cislo, popis, cena

I can show all items in this table (it is list of meal).
I´m trying it, but I´m still unsuccessful:-(.

Here is one of version my code:

Code: Select all

global $gCms;
$db = $gCms->GetDb();
$query = 'SELECT * FROM jidelni_listek';
$dbr = $db->Execute($query);
Code is insert in UDT. Either is showed error or nothing.

Please tell me, where is problem? Now I´m helpless...

Thank for your help!

Honza
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How show items from table

Post by Dr.CSS »

Depending on what you are doing/showing why don't you use a module for this, like Listit2 where you can make your own fields etc...
Post Reply

Return to “CMSMS Core”