Page 1 of 1

How show items from table

Posted: Thu Aug 09, 2012 7:31 pm
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

Re: How show items from table

Posted: Fri Aug 10, 2012 5:23 pm
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...