How show items from table
Posted: Thu Aug 09, 2012 7:31 pm
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 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
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);
Please tell me, where is problem? Now I´m helpless...
Thank for your help!
Honza