Posts

some important mysql function

1.  count() 2. max(); 3. in() ; 4. min(); 5. avg(); 6. sum(); 7.  date() 8. date different ()

JOIN Operation In MYSQL

LEFT JOIN Operation IN MYSQL 1. Select All row from Table Left (Table 1) even if there are no matches in the right table (table2). 2. select All Row from Right Table (Table2) who is match in left Table ; SELECT * FROM Table1 LEFT JOIN Table2 ON Table1.colName=Table2.colName RIGHT JOIN Operation IN MYSQL 1. Select All row from RIGHT Table (Table 2) even if there are no matches in the left table (table1). 2. select All Row from left Table (Table1) who is match in RIGHT Table ; SELECT * FROM Table1 RIGHT JOIN Table2 ON Table1.colName=Table2.colName FULL JOIN Operation IN MYSQL 1. Select All row from Both Table(Table1 , Table2) SELECT * FROM Table1 FULL JOIN Table2 ON Table1.colName=Table2.colName

what is unique key in mysql

unique  is key and its always unique,    that means no repeat  , unique is just like primary key but unique  may be NULL and primary key is not NULL how to create unique key in mysql table CREATE TABLE  tablename ( id  int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), UNIQUE (id) ) how to create unique key in mysql with multiple columns create unique key with combination of multiple column alter table  tbName  add unique index( column1 ,  column2 ,  column3 ,.....)

how to show all post in wordpress but not first

how to show all post of WordPress but not first  and all post is in descending order      <?php $p = 1 ;   query_posts ( $query_string  .  '&orderby=id&order=ASC' );  ?>           <?php  if ( have_posts ()) : while ( have_posts ()) :  the_post (); ?>       <?php $p ++ ;  if( $p == 2 ){ continue ; }  ?>       <h2 class="section_headline"> <?php the_title (); ?> </h2>             <?php    //the_excerpt ();   ?> <?php  the_content ();  ?>   

how to show category id or page id in wordpress

how to show categori id in wordpress how to show page id in WordPress  <?php  echo  $cat_id =  get_query_var ( ‘cat’ ) ;  ?> <?php  echo  $page_id =  get_query_var ( ‘page_id’ ) ;  ?>

show hide div using jquery , how to use show() , hide() function in jquery

Show Hide div using jquery click here for show div show hide div jquery example  Hi , I am Rajeev Dhar Dwivedi <script> function showdiv(){  $("#mydiv").show();    } function hidediv(){ $("#mydiv").hide() } </script> <div id="mydiv" style="display:none; background-color:#FF66CC; width:300px ; height:40px" > <b> Hi , I am Rajeev Dhar Dwivedi </b> </div> <input type="button" onclick="showdiv()" value="Show Div"  /> <input type="button" onclick="hidediv()" value="Hide Div"  />

how to use split() function in javascript

How to use Split() function in javascript String = Rajeev-Dhar-Dwivedi <script> function splitresult(){ var name = 'Rajeev-Dhar-Dwivedi' ; var val=name.split("-"); alert(val[0]); alert(val[1]); alert(val[2]); } </script> <b> String = Rajeev-Dhar-Dwivedi </b> <input type="button" onclick="splitresult()" value="Call Slipt Function"  /> for example you have a string Rajeev-Dhar-Dwived and you want to cut string every - seprator them use split() function in javascript split() function is just like to explote() function in PHP structer : var arrayval=string.split("seprator");   Example: var str = 'Rajeev-Dhar-Dwivedi' ; var val=name.split("-"); val[0]; // Rajeev val[1]; // Dhar val[2]; // Dwivedi