Archive for March 2012

Showing the error message of ajax/jquery requests in a web page.

function xxxxx(){
            $.ajax({
                type: "post", url: "test/abc.php",
                success: function (data, text) {                                                           document.getElementById("progress_success").style.display='block';
                        $("#progress_success1").html('You have successfully done');
                  
                },
                error: function (request, status, error) {
                    document.getElementById("progress_error").style.display='block';
                    $("#progress_error1").html(request.responseText);
                }
            });

        }

Assignment #6 User Login Setup

Description: A user login prompt is set up on the left-NAV for user login convenience. When user is in the main user login page, the left-NAV login is hidden to avoid confusion.

File created:

1)login.php: This is the user login main page. After login, a user is forwarded to the categories to view all the products.

2)loginVal.php: It receives form data from login.php to verify auth of user. User's DB is checked to verify the user ID.

3)logout.php: It clears session data forwards user to login.php upon successful logout

4)includes/loginOnlyINC.php: It protect pages that need authorization and redirect out unauthorized user to other pages.

5)includes/loginINC.php: It shows logout link on any page if user is logged in. Shows login FORM if NOT logged in!

6)includes/logoutINC.php: It shows logout link on any page if user is logged in. Shows login link if NOT logged in!

Learnt: An alternative way for user to loggin to the session protected pages. The whole idea is similar to Admin login page in Assignment#5. "includes/loginOnlyINC.php" file plays an important role as a guidance of confidential web-pages.

Build a PHP-Based Content Management System

CMS Development TECHNO enables non-technical, business users to manage their web site with ease. Techno’s web Content management system is designed with the aim to provide a fully supported, secure and managed service.

Techno’s Content Management System enables non-technical users to take control over every aspect of their website. Techno’s web PHP Content Management System is a fully supported content management system which ensures that users can update information from anywhere in the world in multiple languages.

At Techno, we understand that fast and efficient content management is central to the long-term success and feasibility of your business.

Techno can offer CMS Web Development solution to any organization either with a completely new project from scratch or already existed project which may need redesigning and need a touch of CMS...

Techno’s CMS is your assurance of web excellence.

Techno Infonet also provides other Web services such as Ecommerce Website Design, Wordpress Theme Design, and Joomla Development India at affordable prices.

MySQL tools

The most popular and best open source database is MySQL. Simple as that. It is consistently fast , reliabile and very, very easy to use. One of MySQLs main features is its cross-platform support, it will run on almost all operating systems, including Windows, OSX, Linux and many more. So, MySQL is the best database, and we all use it. The question now is which is the best MySQL Admin and Development Tool?

MySQL Workbench
This application is a fully featured visual database design package that includes database design, modeling, creation and maintenance bundled into a single environment for the MySQL database system.

Heidi SQL
Heidi SQL is lightweight and fast with a flexible interface, it allows you to browse and edit your databases databases, manage tables, view and edit records, manage user-privileges, import data from text files, run SQL queries, synchronize tables between two databases and export selected tables to other databases or SQL scripts, and all this from an intuitive Windows interface.

Aqua Data Studio
This complete IDE, has four major areas of functionality: Database query and administration tools; a suite of compare tools for databases, source control and file systems; integrated source control client for Subversion (SVN) and CVS; and a powerful database modeler.

phpMyAdmin
This very popular, feature rich and easy to use free tool, written in PHP (obviusly), has been built to handle the full administration of MySQL. It can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage users and permissions, and manage keys on fields.

SQLyog
SQLyog is another popular SQL management tool that has a couple of useful features such as visual schema designer, visual query builder, intelligent code completion and a data / structure synchronization. It support HTTP / HTTPs / SSH tunneling and SSL connections. You can also specify a job manager, define a scheduled database backup and use a notification service to be reminded when some jobs are finished.

MYSQL Front
This graphical GUI for the MySQL database, is a “real” application, it can offer a more refined user-interface than is possible with systems built on PHP and HTML. Response is immediate, as there is no delay of reloading HTML-pages.

SQL Buddy
This cool lightweight ajax powered database management tool is amazing. It is very, very easy to install, unzip the folder to your server and thats it. As for upgrading, delete the older version and replace with the new version, simple.

Navicat Lite MySQL Admin Tool
Navicat is a fast, reliable and popular (millions of downloads) Database Administration tool purpose-built for simplifying database management and reducing administrative costs.

Toad MySQL
Toad for MySQL is a database development and administration tool that provides productivity features for rapidly creating and executing queries and managing complex database systems. It provides utilities to compare, extract and search for objects, manage projects, import/export data and administer the database.

MyCon – MySQL GUI
MyCon is an extremely powerful windows based graphical user interface, MySQL GUI, for administering and working with MySQL server databases. This easy to use MySQL GUI front-end client includes all the functionality and tools you will need to be productive in MySQL as a DBA, developer, manager, report writer or a general end-user.

MySQL Sidu
MySQL Sidu is a FREE MySQL client that works via your web browser, it is simple, intuitive and an easy database tool to use. Sidu is not as powerful as other similiar tools but packs enough punch to merit its place in this list, its features may be limited but it does do exactly what the name says (Sidu stands for Select Insert Delete Update).

die() and exit() Functions in php

<?php

@mysql_connect('localhost','root','') or die("not connect");


echo 'connected';

?>

outout  : connected
 
<?php


@mysql_connect('localhost','root','n') or die("not connect");

echo 'connected';

?>

outout  : not connect

<?php

//   " @ " use for errors from php not display

@mysql_connect('localhost','root','') or exit("not connect");

echo 'connected';

?>

outout  : connected

<?php


@mysql_connect('localhost','root','n') or exit("not connect");

echo 'connected';

?>

outout  : not connect

note : 1)     can use " || " in the place of " or " 
         2)    " @ " use for errors not display from php

PHP variable

PHP variable is nothing but a container. In that container we store data. So we can say that PHP variable is a container that store information. Take a look at the picture to understand the PHP variable.

PHP variable naming convention: 

Each variable has a name. To write variable name we need to follow some rules such as
  • PHP variables start with $ sign.
  • A variable can constitute with letter, number, underscore or dash sign.
  • PHP variable is case sensitive.
Here I give some PHP variable examples.
$var, $Var, $myVariable, $this_variable, $product, $_book, $__book, $this-variable

All of the above rule is right but in PHP we cannot write $this-variable, $_book, $__book  type of variable. Now we try to write a variable example with PHP code.

<?php
$var=10;
echo $var;
?>

Save this code with any name and run. This will show 10. If you write same variable many times  in PHP code segment, PHP just count the last variable information such as

<?php
$var=10;
$var=50;
$var=100;
 echo $var;
?>

Try to run this code. PHP variable name is case sensitive. So try to write PHP code with consciously.

<?php
 $var=200;
$Var=100;
echo $var;
echo $Var;
?>

It will show 200 and 100.


Company

Location

Position

Eligibility

Last Date


Microland    Bangalore FreshEnginers    BE/B.TECH    16Apr
Twist Mobile  Premium       IndoreAndroid Developer    BE/B.Tech   13 Apr
WebConnect Pvt. Ltd       Surat
Junior PHP Programmer
    BE/B.Tech   12 Apr

      DelhiSoftware developer    BE/B.Tech(cse,it)     08 Apr

     ChennaiProgrammer Analyst    BE/B.Tech     10 Apr

      Hyderabadjunior web designer   BCA,MCA,BE/B.Tech     08 Apr

   Haryana
-other
Software Developer   BE/B.Tech(Electronics, CSE, ECE, IT)     08 Apr

      Mohali
PHP Developer
    BE/B.Tech(Electronics, CSE, ECE, IT)     02Apr

Floating data type in php

Floating point numbers

Floating point numbers (AKA "floats", "doubles" or "real numbers") can be specified using any of the following syntaxes:

$a = 1.234;

$b = 1.2e3;

$c = 7E-10;

?>

Formally:

LNUM [0-9]+

DNUM ([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*)

EXPONENT_DNUM ( ({LNUM} | {DNUM}) [eE][+-]? {LNUM})

The size of a float is platform-dependent, although a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is a common value (that's 64 bit IEEE format).

Floating point precision

It is quite usual that simple decimal fractions like 0.1 or 0.7 cannot be converted into their internal binary counterparts without a little loss of precision. This can lead to confusing results: for example, floor((0.1+0.7)*10) will usually return 7 instead of the expected 8 as the result of the internal representation really being something like 7.9999999999....

This is related to the fact that it is impossible to exactly express some fractions in decimal notation with a finite number of digits. For instance, 1/3 in decimal form becomes 0.3333333. . ..

So never trust floating number results to the last digit and never compare floating point numbers for equality. If you really need higher precision, you should use the arbitrary precision math functions or gmp functions instead.

Display record in table format

<!-- Save as displayrecord.php -->
<?php
include("config.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Display Records</title>
<style type="text/css">
body{
background-color:#000;
color:#000000;
}
table{
border: solid 1 px #333333;
background-color:#f5f5f5;
margin:0 auto;
margin-top:120px;
text-align:left;
font-size:15px;
border-color:#333333;
width:100%;
height:auto;
}
th{
text-align:center;
color:#0000ff;
}
.c1{
background-color:#e5e5e5;
}
.c2{
background-color:#d5d5d5;
}
table tr:hover
{
  background-color: #ccffcc;
}
table tr:visited
{
  background-color: #ffcc99;
}
</style>
<script language="javascript">
function checkAll(){
for (var i=0;i<document.forms[0].elements.length;i++)
{
var e=document.forms[0].elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox'))
{
e.checked=document.forms[0].allbox.checked;
}
}
}
</script>
</head>

<body>
<form>
<table border='0' cellpadding="2" cellspacing="2" align="center">
<tr style="background-color:#d3dce3;">
<th colspan="3"></td>
<th>First Name</th>
<th>Middle Name</th>
<th>Last Name</th>
<th>User Name</th>
<th>Gender</th>
<th>Prefered Location</th>
<th>Address</th>
<th>STD Code</th>
<th>Phone No</th>
<th>Country Code</th>
<th>Mobile Number</th>
<th>City</th>
<th>State</th>
<th>Country</th>
</tr>
<?php
$counter=1;
$c;
$output=mysql_query("SELECT * FROM registered_user");
while($data = mysql_fetch_array($output))
{
   $editID= $data['userid'];
$delID= $data['userid'];

$firstname=stripslashes($data['firstname']);
$middlename=stripslashes($data['middlename']);
$lastname=stripslashes($data['lastname']);
$username=stripslashes($data['username']);
$sex=$data['sex'];
$preflocation=$data['preflocation'];
$address=stripslashes($data['address']);
$stdcode=stripslashes($data['stdcode']);
$phoneno=stripslashes($data['phoneno']);
$countrycode=stripslashes($data['countrycode']);
$mobileno=stripslashes($data['mobileno']);

$city_id=$data['city_id'];
$getCityName=mysql_query("SELECT city_name FROM tbl_city WHERE city_id=$city_id");
while($cityName=mysql_fetch_array($getCityName))
{
$city=$cityName['city_name'];
}

$state_id=$data['state_id'];
$getStateName=mysql_query("SELECT state_name FROM tbl_state WHERE state_id=$state_id");
while($stateName=mysql_fetch_array($getStateName))
{
$state=$stateName['state_name'];
}

$country=stripslashes($data['country']);

if($counter%2==0)
{
$c=c1;
}
else
{
$c=c2;
}
?>
   <tr class="<?php echo $c; ?>">
<td><input type="checkbox" name="chk1" value="on" /></td>
<td><a href="edit_registration.php?edit=<?php echo $editID; ?>"><img src="images/b_edit.png" alt="Edit" title="Edit" style="border:none;"></a></td>
<td><a onclick='if(confirm("Are you sure you want to delete ?")){ return true;}else{return false;}' href="deluser.php?del=<?php echo $delID; ?>" alt="Delete" title="Delete" ><img src="images/b_drop.png" style="border:none;"></a></td>
<td><?php echo $firstname ?></td>
<td><?php echo $middlename ?></td>
<td><?php echo $lastname ?></td>
<td><?php echo $username ?></td>
<td><?php echo $sex ?></td>
<td><?php echo $preflocation ?></td>
<td><?php echo $address ?></td>
<td><?php echo $stdcode ?></td>
<td><?php echo $phoneno ?></td>
<td><?php echo $countrycode ?></td>
<td><?php echo $mobileno ?></td>
<td><?php echo $city ?></td>
<td><?php echo $state ?></td>
<td><?php echo $country ?></td>
</tr>
<?php
$counter++;
}
?>
</table>
</form>
</body>
</html>


PHP while loop

PHP while is an iterative loop by which we can repeat a condition based on condition. The general form of PHP while loop is
while(condition)

{

executed satement

}

PHP while loop starts with the name while and then condition. If the condition is true then it allows to execute the statement otherwise it terminates the while loop. So we can say that the condition part returns true or false.

PHP while loop example

Now we try to do a problem using php while loop. The problem is to add 1,2,3,4,5,6,7,8,9 and 10. So the code is
<?php
$value=1;
$sum=0;
while($value<=10)
{
    $sum=$sum+$value;
    $value++;
    }
    echo $sum;
?>
If the while condition is not true then the PHP while loop will not execute the inner code. Here is an example.
<?php
$value=1;
$sum=0;
while(!$value==1)
{
    $sum=$sum+$value;
    $value++;
    }
    echo $sum;
?>

PHP GET & POST



There are two ways the browser client can send information to the web server.
  • The GET Method
  • The POST Method
Before the browser sends the information, it encodes it using a scheme called URL encoding. In this scheme, name/value pairs are joined with equal signs and different pairs are separated by the ampersand.
name1=value1&name2=value2&name3=value3
Spaces are removed and replaced with the + character and any other non alphanumeric characters are replaced with a hexadecimal values. After the information is encoded it is sent to the server.
The GET Method
The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character.
http://www.test.com/index.htm?name1=value1&name2=value2
  • The GET method produces a long string that appears in your server logs, in the browser's Location: box.
  • The GET method is restricted to send upto 1024 characters only.
  • Never use GET method if you have password or other sensitive information to be sent to the server.
  • GET can't be used to send binary data, like images or word documents, to the server.
  • The data sent by GET method can be accessed using QUERY_STRING environment variable.
  • The PHP provides $_GET associative array to access all the sent information using GET method.
Try out following example by putting the source code in test.php script.
<?php
  if( $_GET["name"] || $_GET["age"] )
  {
     echo "Welcome ". $_GET['name']. "<br />";
     echo "You are ". $_GET['age']. " years old.";
     exit();
  }
?>
<html>
<body>
  <form action="<?php $_PHP_SELF ?>" method="GET">
  Name: <input type="text" name="name" />
  Age: <input type="text" name="age" />
  <input type="submit" />
  </form>
</body>
</html>
The POST Method
The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING.
  • The POST method does not have any restriction on data size to be sent.
  • The POST method can be used to send ASCII as well as binary data.
  • The data sent by POST method goes through HTTP header so security depends on HTTP protocol. By using Secure HTTP you can make sure that your information is secure.
  • The PHP provides $_POST associative array to access all the sent information using GET method.
Try out following example by putting the source code in test.php script.
<?php
  if( $_POST["name"] || $_POST["age"] )
  {
     echo "Welcome ". $_POST['name']. "<br />";
     echo "You are ". $_POST['age']. " years old.";
     exit();
  }
?>
<html>
<body>
  <form action="<?php $_PHP_SELF ?>" method="POST">

  Name: <input type="text" name="name" />
  Age: <input type="text" name="age" />

  <input type="submit" />
  </form>
</body>
</html>
The $_REQUEST variable
The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE. We will discuss $_COOKIE variable when we will explain about cookies.
The PHP $_REQUEST variable can be used to get the result from form data sent with both the GET and POST methods.
Try out following example by putting the source code in test.php script.
<?php
  if( $_REQUEST["name"] || $_REQUEST["age"] )
  {
     echo "Welcome ". $_REQUEST['name']. "<br />";
     echo "You are ". $_REQUEST['age']. " years old.";
     exit();
  }
?>
<html>
<body>
  <form action="<?php $_PHP_SELF ?>" method="POST">

  Name: <input type="text" name="name" />
  Age: <input type="text" name="age" />

  <input type="submit" />
  </form>
</body>
</html>
Here $_PHP_SELF variable contains the name of self script in which it is being called.

Objects

Basic object-oriented programming functionality was added in PHP 3. Object handling was completely rewritten for PHP 5, expanding the feature set and enhancing performance. In previous versions of PHP, objects were handled like primitive types. The drawback of this method was that the whole object was copied when a variable was assigned or passed as a parameter to a method. In the new approach, objects are referenced by handle, and not by value. PHP 5 introduced private and protected member variables and methods, along with abstract classes and final classes as well as abstract methods and final methods. It also introduced a standard way of declaring constructors and destructors, similar to that of other object-oriented languages such as C++, and a standard exception handling model. Furthermore, PHP 5 added interfaces and allowed for multiple interfaces to be implemented. There are special interfaces that allow objects to interact with the runtime system. Objects implementing ArrayAccess can be used with array syntax and objects implementing Iterator or IteratorAggregate can be used with the foreach language construct. There is no virtual table feature in the engine, so static variables are bound with a name instead of a reference at compile time.

If the developer creates a copy of an object using the reserved word clone, the Zend engine will check if a __clone() method has been defined or not. If not, it will call a default __clone() which will copy the object's properties. If a __clone() method is defined, then it will be responsible for setting the necessary properties in the created object. For convenience, the engine will supply a function that imports the properties of the source object, so that the programmer can start with a by-value replica of the source object and only override properties that need to be changed.

PHP Loop Types



Loops in PHP are used to execute the same block of code a specified number of times. PHP supports following four loop types.
  • For - loops through a block of code a specified number of times.
  • While - loops through a block of code if and as long as a specified condition is true.
  • Do...while - loops through a block of code once, and then repeats the loop as long as a special condition is true.
  • foreach - loops through a block of code for each element in an array.
We will discuss about continue and break keywords used to control the loops execution.

The for loop statement

The for statement is used when you know how many times you want to execute a statement or a block of statements.

Syntax

for (initialization; condition; increment)
{
  code to be executed;
}
The initializer is used to set the start value for the counter of the number of loop iterations. A variable may be declared here for this purpose and it is traditional to name it $i.

Example

The following example makes five iterations and changes the assigned value of two variables on each pass of the loop:
<html>
<body>
<?php
$a = 0;
$b = 0;
 
for( $i=0; $i<5; $i++ )
{
    $a += 10;
    $b += 5;
}
echo ("At the end of the loop a=$a and b=$b" );
?>
</body>
</html>
This will produce following result:
At the end of the loop a=50 and b=25

The while loop statement

The while statement will execute a block of code if and as long as a test expression is true.
If the test expression is true then the code block will be executed. After the code has executed the test expression will again be evaluated and the loop will continue until the test expression is found to be false.

Syntax

while (condition)
{
    code to be executed;
}

Example

This example decrements a variable value on each iteration of the loop and the counter increments until it reaches 10 when the evaluation is false and the loop ends.
<html>
<body>
<?php
$i = 0;
$num = 50;
 
while( $i < 10)
{
   $num--;
   $i++;
}
echo ("Loop stopped at i = $i and num = $num" );
?>
</body>
</html>
This will produce following result:
Loop stopped at i = 10 and num = 40 

The do...while loop statement

The do...while statement will execute a block of code at least once - it then will repeat the loop as long as a condition is true.

Syntax

do
{
   code to be executed;
}while (condition);

Example

The following example will increment the value of i at least once, and it will continue incrementing the variable i as long as it has a value of less than 10:
<html>
<body>
<?php
$i = 0;
$num = 0;
do
{
  $i++;
}while( $i < 10 );
echo ("Loop stopped at i = $i" );
?>
</body>
</html>
This will produce following result:
Loop stopped at i = 10

The foreach loop statement

The foreach statement is used to loop through arrays. For each pass the value of the current array element is assigned to $value and the array pointer is moved by one and in the next pass next element will be processed.

Syntax

foreach (array as value)
{
    code to be executed;
 
}

Example

Try out following example to list out the values of an array.
<html>
<body>
<?php
$array = array( 1, 2, 3, 4, 5);
foreach( $array as $value )
{
  echo "Value is $value <br />";
}
?>
</body>
</html>
This will produce following result:
Value is 1
Value is 2
Value is 3
Value is 4
Value is 5

The break statement

The PHP break keyword is used to terminate the execution of a loop prematurely.
The break statement is situated inside the statement block. If gives you full control and whenever you want to exit from the loop you can come out. After coming out of a loop immediate statement to the loop will be executed.

Example

In the following example condition test becomes true when the counter value reaches 3 and loop terminates.
<html>
<body>
 
<?php
$i = 0;
 
while( $i < 10)
{
   $i++;
   if( $i == 3 )break;
}
echo ("Loop stopped at i = $i" );
?>
</body>
</html>
This will produce following result:
Loop stopped at i = 3

The continue statement

The PHP continue keyword is used to halt the current iteration of a loop but it does not terminate the loop.
Just like the break statement the continue statement is situated inside the statement block containing the code that the loop executes, preceded by a conditional test. For the pass encountering continuestatement, rest of the loop code is skipped and next pass starts.

Example

In the following example loop prints the value of array but for which condition becomes true it just skip the code and next value is printed.
<html>
<body>
<?php
$array = array( 1, 2, 3, 4, 5);
foreach( $array as $value )
{
  if( $value == 3 )continue;
  echo "Value is $value <br />";
}
?>
</body>
</html>
This will produce following result
Value is 1
Value is 2
Value is 4 
Value is 5


logical operators in php

                                              logical operators in php :  && , || , !




<?php


$a=10;
$b=20;
if($a<15 && $b>15)
echo  "$a is less than 15 and $b is grater than 15";


?>
output : 10 is less than 15 and 20 is grater than 15






<?php



$a=10;
$b=20;
if($a<15 || $b<15)
echo  "$a is less than 15 and $b is grater than 15";


?>
output : 10 is less than 15 or 20 is grater than 15





<?php



$a=10;
$b=20;
if(!($a<15 && $b>15))
echo  "$a is less than 15 and $b is grater than 15";


?>
output : 


nothing to display , because , inner value is true and we apply ! to that so , the value of if statement is false







mysql dump

mysqldump is the client program for the back up of mysql database/tables.

to generate just schema of a table we can use option -d.

to limit the data in mysqldump we can use option --where="true limit 1000" which will give 1000 records.

ex. command is
mysqldump -u -p [] --where="true limit " > filenameforbackup.sql

Multiple Table Join in MySQL




Normal SQL Format
-----------------------------

SELECT A.<column_name> AS FIRSTNAME,B.<column_name> AS LASTNAME,C.<column_name> AS JOB 
FROM A,B,C
WHERE
 
A.ID = B.ID AND
B.ID = C.ID


ANSI Format
-------------------
SELECT A.<column_name>,B.<column_name>,C.<column_name> 
FROM A INNER JOIN B
 
ON
 A.ID = B.ID INNER JOIN C
ON
 B.ID = C.ID


Also
SELECT A.<column_name> AS FIRSTNAME,B.<column_name> AS LASTNAME,C.<column_name> AS JOB 
FROM A,B,C
WHERE
 
A.ID = B.ID AND
B.ID = C.ID AND (any other filter Condition ,such as A.status = 'TRUE')
ORDER BY A.<column_name>,B.<column_name>


SELECT A.<column_name>,B.<column_name>,C.<column_name> 
FROM A INNER JOIN B
 
ON
 A.ID = B.ID INNER JOIN C
ON
 B.ID = C.ID AND (any other filter Condition ,such as A.status = 'TRUE')
ORDER BY A.<column_name>
 
eg :
SELECT UPPER (U.USER_NAME) USERNAME, REPLACE(UR.USER_ROLE,'_') ROLE,L.NAME ACTION FROM LIMSCOTTON.LIMS_USERS U,LIMSCOTTON.USER_ROLE UR,LIMSCOTTON.GROUP_ENTRY L WHERE  UPPER (TRIM(U.USER_NAME)) = UPPER (TRIM(UR.USER_NAME)) AND UPPER (TRIM(UR.USER_NAME)) = UPPER(TRIM(L.USER_NAME)) AND UPPER (TRIM(U.USER_DISABLED)) = 'F' ORDER BY UPPER (U.USER_NAME)