Saturday, August 17, 2013

Download PDF books

This folder have containing following pdfs.
1. [SitePoint] Simply JavaScript
2. ASP NET - Web Developers Guide
3. Beginning_MYSQL_5_with_Visual_Studio.NET_2005
4. Java Swing, 2nd Edition
5. jQuery.in.Action.Feb.2008.Manning (2)
6. Operating System Concepts
7. Oracle 9i
8. PHP A BEGINNERS GUIDE
9. SCJP Sun Certified Programmer for Java 6

Download Link #1-: https://drive.google.com/folderview?id=0BweG5sKiHRrxa0gtT2wwYzdBV0k&usp=sharing


Download shopping cart template

Regular Expression Syntax in PHP


Regular Expression Syntax

^ – Start of string
$ – End of string
. – Any single character
( ) – Group of expressions
[] – Item range ( e.g. [afg] means a, f, or g )
[^] – Items not in range ( e.g. [^cde] means not c, d, or e )
- (dash) – character range within an item range ( e.g. [a-z] means a through z )
| (pipe) – Logical or ( e.g. (a|b) means a or b )
? – Zero or one of preceding character/item range
* – Zero or more of preceding character/item range
+ – One or more of preceding character/item range
{integer} – Exactly integer of preceding character/item range ( e.g. a{2} )
{integer,} – Integer or more of preceding character/item range ( e.g. a{2,} )
{integer,integer} – From integer to integer (e.g. a{2,4} means 2 to four of a )
\ – Escape character
[:punct:] – Any punctuation
[:space:] – Any space character
[:blank:] – Any space or tab
[:digit:] – Any digit: 0 through 9
[:alpha:] – All letters: a-z and A-Z
[:alnum:] – All digits and letters: 0-9, a-z, and A-Z
[:xdigit:] – Hexadecimal digit
[:print:] – Any printable character
[:upper:] – All uppercase letters: A-Z
[:lower:] – All lowercase letters: a-z

check two variable containing strings are same or not

<?php
$t=strcmp("dabc","abc");
if($t==0)
echo 'both string are same';
else
echo 'string are not same';
 ?>

Friday, August 16, 2013

select mutipal record from more than one table without join


SELECT
   table1.id,
table1.user_id,
 table2.email,
table2.name FROM table1, table2
 WHERE table1.user_id=table2.user_id

Thursday, August 15, 2013

Downlaod some awesome jquery plugins.
like-:
audio/video.
desktop backgroundImage channger
webcam

-----------------------link---------------
https://drive.google.com/folderview?id=0BweG5sKiHRrxbTZGRVpLUWdqeEU&usp=sharing

Sunday, August 11, 2013

paging in php

<html>
<head>
<title>Paging Using PHP</title>
</head>
<body>
<?php
$dbhost = 'localhost:3036';
$dbuser = 'root';
$dbpass = 'rootpassword';
$rec_limit = 10;
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
{
  die('Could not connect: ' . mysql_error());
}
mysql_select_db('test_db');
/* Get total number of records */
$sql = "SELECT count(emp_id) FROM employee ";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
  die('Could not get data: ' . mysql_error());
}
$row = mysql_fetch_array($retval, MYSQL_NUM );
$rec_count = $row[0];
if( isset($_GET{'page'} ) )
{
   $page = $_GET{'page'} + 1;
   $offset = $rec_limit * $page ;
}
else
{
   $page = 0;
   $offset = 0;
}
$left_rec = $rec_count – ($page * $rec_limit);
$sql = "SELECT emp_id, emp_name, emp_salary ".
       "FROM employee ".
       "LIMIT $offset, $rec_limit";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
  die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
    echo "EMP ID :{$row['emp_id']}  <br> ".
         "EMP NAME : {$row['emp_name']} <br> ".
         "EMP SALARY : {$row['emp_salary']} <br> ".
         "——————————–<br>";
if( $page > 0 )
{
   $last = $page – 2;
   echo "<a href=\"$_PHP_SELF?page=$last\">Last 10 Records</a> |";
   echo "<a href=\"$_PHP_SELF?page=$page\">Next 10 Records</a>";
}
else if( $page == 0 )
{
   echo "<a href=\"$_PHP_SELF?page=$page\">Next 10 Records</a>";
}
else if( $left_rec < $rec_limit )
{
   $last = $page – 2;
   echo "<a href=\"$_PHP_SELF?page=$last\">Last 10 Records</a>";
}
mysql_close($conn);
?>

Thursday, August 8, 2013

Add days in current date [php]

$current_date=date("Y-m-d");
//$last_date=date("Y-m-d",strtotime(' +7 day'));
$event_day=date("Y-m-d",strtotime(' +8 day'));

echo $event_day;