<?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

Tell me how do you execute a php script from the command line?

0 Answers  


Write the statements that are used to connect php with mysql

0 Answers  


Explain what is the use of "echo" in php?

0 Answers  


How does api connect to database?

0 Answers  


What interest would a "work-for-ownership" offer receive from PHP/MySQL developers?

1 Answers  






What is RSS?How to use it in Program?

3 Answers  


Hi, My Name is Ajay Jha. What My Question is I am Percuing in Bca. It's My 5th Semester. I Want To Make My Carrear as a web designer that's Why i wants to do Php, Is it right Desision for Me ?

1 Answers  


Tell me what are the __construct() and __destruct() methods in a php class?

0 Answers  


can we use PGP with PHP?

1 Answers  


What is scope of variable in php?

0 Answers  


Explain object-oriented methodology in php?

0 Answers  


Hi all, I have a problem in Apache on windows xp.I tried to unistall apache and install it again. But when in did the installation again, and tried to run apache, i get the following error message, Socketaddresse can just be used once. Make_sock: could not build to address 0.0.0.0.80 No listening sockets available.Shutting down Unable to open logs. and i also get (error) OS2. The system cannot fine the installed service named "Apache2". Please i need some one to help me out with this.I'm really fustrated cuz i need this stuff working as fast as possible. PLEASE HELP ME

2 Answers  


Categories