Tag Archives: insert

Retrieving a database insert Index ID using DBI

#!/usr/bin/perl   use DBI; use strict;   my $username = "dbuser"; my $password = "dbpassword"; my $dsn = "dbi:mysql:goo:192.168.1.10"; my $dbh = DBI->connect($dsn,$username,$password) or die "Cannot connect to database: $DBI::errstr"; my $sth = $dbh->prepare("INSERT INTO urls VALUES (”,’http://www.w3mentor.com/’,'tutorials’,unix_timestamp(),’query words’)"); $sth->execute() … Continue reading

Posted in Modules | Tagged , , | Leave a comment

Inserting into a database using DBI

#!/usr/bin/perl use DBI; use strict; my $username = "dbuser"; my $password = "dbpassword"; my $dsn = "dbi:mysql:goo:192.168.1.10"; my $dbh = DBI->connect($dsn,$username,$password) or die "Cannot connect to database: $DBI::errstr"; my $sth = $dbh->prepare("INSERT INTO urls VALUES (”,’http://www.w3mentor.com/’,'tutorials’,unix_timestamp(),’query words’)"); $sth->execute() or die … Continue reading

Posted in Modules | Tagged , , | Leave a comment

Adding Objects to Arraylist Collection in C#

The c-sharp ArrayList class can hold unordered objects of any type. There are two methods that the ArrayList class supports for adding items into the collection named Add and AddRange. The Add method allows the addition of a single object … Continue reading

Posted in C# Collections and Generics | Tagged , , | Leave a comment

Upload and store files in Mysql using PHP : Part 2 – PHP file processing

To store uploaded files to MySQL database, you can use the normal INSERT statement as shown in the php example listed below: <?php $con = mysql_connect("localhost", "", ""); mysql_select_db("w3m"); $error = $_FILES[’w3img’][’error’]; $tmp_name = $_FILES[’w3img’][’tmp_name’]; $size = $_FILES[’w3img’][’size’]; $name = … Continue reading

Posted in PHP File Handling | Tagged , , , | Leave a comment

Inserting a Row in Mysql

INSERT INTO TABLENAME (col1, col2, col3) VALUES (’aaa, ‘bbb’, NULL);

Posted in MYSQL Basics | Tagged , | Leave a comment