<?php
/**
* @version 1.0 $
* @package HelloWorld
* @copyright (C) 2005 Andrew Eddie
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this
location is not allowed.' );

?>

<?php
$database =& JFactory::getDBO();

//$sql = 'SELECT name, username FROM #__users';
$sql="select a.id, a.title, a.introtext, a.created_by,
a.created from jos_content a, jos_content_frontpage b where
a.id=b.content_id and b.ordering='2'";

$database->setQuery( $sql );
$user = NULL;
$user = $database->loadObject();
//echo 'Name: ' . $user->name . '<br />';
echo '<h1>' . $user->title . '</h1><br />';
//echo 'Username: ' . $user->username;
echo ' ' . $user->introtext;
i write this and fetch the result from the database the
result is
The Intranet is up and working !

Our intranet is up and working and should be accessible
from both Mumbai and NOIDA.

As you will notice, this template, look & feel is not in
line with our corporate indentity but we chose the route
of "form-follows-funtion"

In the first phase, we are rolling out functionality that
is critical to all of us - Policies and How-to documents.
In subsequent phases, we will be launching other features.

Keep watching this space for more details

i want to see only 4 line of top then how this may done


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More PHP Interview Questions

How do you display the output directly to the browser?

0 Answers  


how to use particular city location in php?

1 Answers   TCS,


What is beforeRender() used?

0 Answers   HCL,


What are getters and setters php?

0 Answers  


What is the function mysql_pconnect() useful for?

0 Answers  






how set session expire time in php?

4 Answers  


Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?

0 Answers  


What is difference Between PHP 5 and 7?

0 Answers  


What is http php?

0 Answers  


What types of images that PHP supports?

2 Answers  


How to create a public static method in PHP?

0 Answers  


Explain converting an object?

0 Answers  


Categories