Switch to full style
PHP examples
Post a reply

insert query example

Wed Oct 26, 2011 12:47 am

insert query example in php

Code:

      function insert_user
($username,$password,$firstname,$lastname,$email,$address1,$address2,$telephone,$mobile,$date_birthday,$gender,$country_code,$city,$activationkey)
      {
         $date = date("Y-m-d H:i:s"); 
         $query 
=" INSERT INTO `user` VALUES (0,null,'$country_code','$username','$firstname','$lastname','$password'
,'$address1','$address2','$telephone','$mobile','$email','$city',0,'$date','$date','$date_birthday','$gender',0,
'$activationkey',0)"
;
         $result =mysql_query($query );
         echo mysql_error();
         return mysql_affected_rows();
      }
 




Post a reply
  Related Posts  to : insert query example
 Insert using native query     -  
 DML Statements, insert row, delete row     -  
 insert a namespace in a tag with jaxb     -  
 Image Insert in Excel File Using POI     -  
 Can't insert dynamic link in jstl     -  
 Asp.net insert update delete Examples     -  
 insert information in html file with java     -  
 form to insert data, upload many files and images , database     -  
 EJB-QL IN where query     -  
 SQL LIKE query Command     -  

Topic Tags

PHP Database