<?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 to get no of arguments passed to a PHP Function?

0 Answers  


How can I embed a java programme in PHP file and what changes have to be done in PHP.ini file?

1 Answers   Sify, Small Biz Express,


i was set new individual folder for saving session values,the folder name is session and i set 777 permission,using session.save_path function like session.save_path "/home21b/sub004/sc21311-ULCX/candyoflove.com/session/" but it causing Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid/gid is 12112/12112 is not allowed to access /home21b/sub004/sc21311-ULCX/candyoflove.com/session owned by uid/gid 12267/12267 in Unknown on line 0 ,please tell what changes make this script, i was using .htaccesss file..plz help me....

1 Answers  


How many php based companies in bangalore and chennai and over all india ? most of the persons saying for 2 years and 3 years they will be getting less than 15k per month how far is it true ? is it good scope for experience people can any one tell the exact experience pay for php developers one yr experience how much sal we expect ? two yr experience how much sal we expect ? three yr expereince how much sal we expect ? please kindly reply to the above questions as an experts you only please kindly judge and tell your practical experience in PHP ?

3 Answers  


What is better .net or php?

0 Answers  


What is uniqid php?

0 Answers  


What are examples of independent and dependent variables?

0 Answers  


Applications written to provide a GUI shell for Unix and Linux are called

0 Answers  


What is var_dump function in php?

0 Answers  


Differences between get, post and request methods ?

0 Answers  


How to set cookies in PHP?

0 Answers  


What is cookie and why do we use it?

0 Answers  


Categories