[insert_php]
echo ‚Server date and time is: ‚;
echo date(‚l, F j, Y \a\t G:i:s‘);
[/insert_php]
[insert_php]
global $wpdb;
$posts = $wpdb->get_row(„SELECT * FROM pracovnici2 WHERE id > 0“);
echo $posts->jmeno .‘
‚;
$typ = 2;
$result = $wpdb->get_row (“ SELECT * FROM mojdb.rek_partneri WHERE typ = “ . $typ . „;“);
echo $result->nazev .’huhuhu
‚;
//$posts = $wpdb->get_row(„SELECT ID, post_title FROM wp_posts WHERE post_status = ‚publish‘
// AND post_type=’post‘ ORDER BY comment_count DESC LIMIT 0,1″);
// echo $posts->post_title;
$result = $wpdb->get_results ( “
SELECT *
FROM $wpdb->posts
WHERE post_type = ‚page‘
“ );
foreach ( $result as $page )
{
echo $page->ID.‘ – ‚;
echo $page->post_title.‘
‚;
}
[/insert_php]
jsem zde1
[insert_php]
//$sel1 = “ WHERE typ = 3 „;
//$result = $wpdb->get_results („SELECT * FROM mojdb.rek_firmy “ . $sel1 . „;“);
$typ = „3“;
$sel1 = “ SELECT * FROM mojdb.rek_firmy WHERE typ = “ . $typ ;
$result = $wpdb->get_results (“ “ . $sel1 . „;“);
foreach ( $result as $page )
{
echo ‚‚ . $page->firma .‘ – ‚;
echo $page->typ.‘
‚;
}
[/insert_php]
jsem zde2
[insert_php]
$result = $wpdb->get_results ( “
SELECT *
FROM mojdb.rek_firmy
WHERE typ = 2
“ );
foreach ( $result as $page )
{
echo $page->firma.‘ – ‚;
echo $page->typ.‘
‚;
}
[/insert_php]
jsem zde3
[insert_php]
$result = $wpdb->get_results ( “
SELECT *
FROM pracovnici2
WHERE id > 0
order by id
“ );
foreach ( $result as $page )
{
echo $page->id.‘ – ‚;
echo $page->jmeno.‘
‚;
}
[/insert_php]