PHP function using PDO for databse

function db_connect()
{
    $dsn = "mysql:host=localhost;dbname=test;charset=utf8";
    $opt = array(
        PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
        PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
    );
    return new PDO($dsn,'root','', $opt);
}
 
 
$pdo = db_connect();

but note again - unlike with mysql_query(), you have to always use this $pdo variable for your queries.
 
you need not a boolean but PDO object. 
 
 
  • PDO is OO, meaning the connection to the database is represented by a PDO Object.
  • Your db_connect() function should return the object that gets created.
  • Passing in the parameters required by PDO will give you more flexibility!
 

Create the months table With MySQL

Create the months table as follows:
CREATE TABLE months (
   month_id INT NOT NULL AUTO_INCREMENT,
   month VARCHAR (20),
   days INT,
   PRIMARY KEY (month_id)); 
 
 
To add the months to the new table, specify:
INSERT INTO months VALUES (NULL,'January',31);
INSERT INTO months VALUES (NULL,'February',28);
INSERT INTO months VALUES (NULL,'March',31);
INSERT INTO months VALUES (NULL,'April',30);
INSERT INTO months VALUES (NULL,'May',31);
 INSERT INTO months VALUES (NULL,'June',30);
INSERT INTO months VALUES (NULL,'July',31);
INSERT INTO months VALUES (NULL,'August',31);
INSERT INTO months VALUES (NULL,'September',30);
 INSERT INTO months VALUES (NULL,'October',31);
INSERT INTO months VALUES (NULL,'November',30);
INSERT INTO months VALUES (NULL,'December',31);
 
 
 
 
 

Nokia Oyj

The Microsoft acquisition of Nokia Contrivances and Accommodations is expected to close later
 this month and to prepare for the transition a letter has been sent out to Nokia's supplier base.

The letter, which has leaked online, suggests that Nokia Oyj will get an incipient name: Microsoft Mobile Oy. The company is going to subsist as a plenarily-owned Microsoft subsidiary and as you would expect it is going to handle the mobile contrivances engenderment. The letter reveals that current terms and conditions that suppliers were having with Nokia until now will not be transmuted.

Nokia is keeping its relationship with subsisting supplier partners, but considering the company's main operations remain NSN, HERE Maps and Advanced Technology unit, it may not soon need some of them, as most deal with hardware. Nokia has been rumored to be working on a smartwatch, but we don't ken if the company is going to keep the development.

Oppo N1

Oppo N1


Oppo N1, the company's last year flagship smartphone is now available for
 a discounted price tag in Europe. The smartphone can now be picked from
the Oppo Style webstore for €369 (about $500). Oppo N1 on a mundane day
costs $449 about $620, but the store is offering the smartphone for a bargain
 price as a promotional campaign. The deal is applicable to the 16GB white

version and is valid until April 25. However, please note that Oppo Style Store
 ships their products only to certain regions across the globe. For your mazuma,
 you will be getting 5.9-inch exhibit with a resolution of 1080 x 1920 pixels.

The smartphone features a Qualcomm Snapdragon 600 chipset with 1.7 GHz quad-core
 processor, Adreno 320 GPU and 2 GB of RAM. There is a 13 megapixel swirling
camera with dual-LED flash and you get 16 GB of internal storage. You can check
 out our detailed review of Oppo N1 to ken more about the smartphone.

Jobs At ISRO Development and Educational Communication

Indian Space Research Organisation (ISRO) 
Development and Educational Communication Unit (DECU),  Ahmedabad


ISRO SAC Development and Educational Communication Unit, Ahmedabad invites online application for the following posts :

  1. Social Research Officer - C : 01 post 
  2. Junior Producer : 01 post
  3. Social Research Assistant : 03 posts
  4. Programme Assistant : 03 posts
  5. Technical Assistant (Sound Recording) : 01 post
  6. Scientific Assistant - A (Multimedia) : 05 posts
  7. Media Library Assistant - A : 01 post
  8. Library Assistant - A : 01 post
How to apply : The application for on-line registration is hosted in the ISRO web-site between 16/04/2014 and 05/05/2014.

More Details  http://www.sac.isro.gov.in 

Job At IIT Kanpur

IIT Kanpur invites online applications for the following posts on Regular/ Deputation/ contract basis for a period of 5 years which is extendable on noteworthy performance :

  1. Medical Officer : 01 post
  2. Junior Superintendent : 04 posts
  3. Sanitary Inspector Gr.I : 01 post
  4. Junior Technical Superintendent : 22 posts
  5. Junior Technician : 13 posts
  6. Junior Assistant : 10 posts
  7. Assistant Coach : 04 posts
How to Apply :  Apply Online at IIT Kanpur website on or before 05/05/2014 only.

Online application form,  http://www.iitk.ac.in/infocell/recruitment/

Job for Faculty National Institute of Technology

Advertisement for Faculty Positions

NIT Arunachal Pradesh  invites Online applications from Indian nationals for following Faculty posts :

  • Professor / Associate Professor : in Computer Science & Engineering/ Electronics & Communication Engineering/ Electrical Engineering 
  • Assistant Professor : in Civil Engineering/ Mechanical Engineering / Mathematics
Application Fee : Rs.600/- (Rs.150/- for SC/ST) in the form of Bank Draft, payable  in favour of National Institute of Technology payable at SBI, Nirjuli.

How to Apply : Apply Online at NIT Arunachal website and send printout of the system generated application form should be dispatched through Speed Post/Registered Post on or before 31/05/2014 to The Confidential Assistant (Miss Abi Tayeng),  National Institute of Technology (NIT), Arunachal Pradesh, Yupia, District Papum Pare,  Arunachal Pradesh - 791112 

View Details:-  http://www.nitap.in/Vacancies.aspx  

Jobs Executives-HINDUSTAN COPPER LIMITED

HINDUSTAN COPPER LIMITED
Hindustan Copper Limited (HCL) invites online applications from qualified and experienced Indian Nationals  for the following 60 posts of Executives in various disciplines and grades in :

  1. Dy. General Manager : 02 posts
  2. Assistant General Manager : 02 posts
  3. Chief Manager : 08 posts
  4. Senior Manager : 03 posts
  5. Manager : 02 posts
  6. Deputy Manager : 16 posts
  7. Assistant Manager : 27 posts
Freshers will be taken as Graduate Engineer Trainee (GET) / Management Trainee (MT)

Application Fee :  Rs.750/- in the form of DD in favour of Hindustan Copper Limited payable at Kolkata. Rs. 250/- from SC/ST/PWD/ Female candidates.
 Apply Online at Hindustan Copper website from 17/04/2014 to 16/05/2014 only.
Online application form:-  http://www.hindustancopper.com/career.asp

LG Lucid 3-come

the new LG Lucid 3 for Verizon is a pretty decent handset, and it can be yours for $300,
no strings attached. If you don't mind signing on the dotted line for a two year agreement,
 then you could always get the device for free, which isn't bad, considering the Lucid 3's
 specs. It packs a 4.7" 960x540 display, a 1.2GHz quad core CPU, 8GB built-in storage


 with a microSD card slot, and a 5MP camera. There isn't any info on how much RAM the Lucid 3 is packing, but don't expect it to be lower than 1GB. The phone is also rocking Android
KitKat 4.4.2 out of the box, and will give you 2,440 mAh worth of juice.



The design of the device is also worth talking about: it's about the same size as the Moto X, in spite of its physical buttons. As a result, the phone has almost no bezel, which gives the illusion of it being a more premium device than it really is.

Amazon's smartphone

The images reveal the yet to be announced handset wearing typical for prototype devices, hard enclosure which hides its design. The leaked images show a whopping five front-facing camera units on the device.


One of them is tipped to serve standard video calling duties, while the remaining four snappers will play role in creating the already rumored glasses-free, head-tracking 3D effect. Reportedly, the 3D effect
 feature will be limited at the device's launch - it will be reserved for only several built-in gestures.



 However, Amazon is said to be hard at work at courting developers to cook up apps which can utilize the innovative tech. In addition to the handful of camera modules, the upcoming Amazon phone is said to feature a 4.7" 720p display and 2GB of RAM. The chipset of the device will be a yet to be known Qualcomm Snapdragon unit. Unsurprisingly, the handset will boot Amazon's modified Android build, called FireOS. Amazon's smartphone is tipped to debut as early as this coming June. The official name of the device is yet to be known.