Import CSV File into MySQL Database
Suppose there is a csv file named address.csv which contains name,email records we can export this data in to my sql with the statements Here we are populating the content to Table Address with skipping very first row which contains labels LOAD DATA INFILE address.csv’ INTO TABLE Address FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ [...]
full storyWindows 7 IIS ASP SQL not working
By default IIS and SQL Server combination debugging is not default enabled to configure ASP + SQL combination we must configure 3 things 1. Enable ASP Debugging Go to Control Panel > Administrative tools > ASP Go to Debugging Sent error to Browser =true Now SQL issue To work with IIS SQL Should enable TCP/IP [...]
full storysql server change login for a user
Syntax alter user user_name with login= login_name eg. Setting login1 as default login for user user1 use db1 alter user user1 with login=login1
full storystart support system for your comapny with email support
tickets are the new trends in support systems, because of its simplicity and tracable nature tickets are nothing but support /queries raised aganist services of a firm to its concerned departments osTicket is a widely-used open source support ticket system. It seamlessly integrates inquiries created via email, phone and web-based forms into a simple easy-to-use [...]
full storyASP MSSQL Connection
While using asp my convention is to make a connection function inside asp block and to include it on all ASP Files Sub OpenDatabase(ByRef dbConn) Set dbConn = Server.CreateObject(“ADODB.Connection”) dbConn.ConnectionTimeout = 150 dbConn.CommandTimeout = 150 dbConn.Open “Provider=SQLOLEDB.1;Persist Security Info=False;User ID=username;Password=password;Initial Catalog=database name;Data Source=localhost” end sub savethis into SQLC.asp (SQL Connection) and include in all asp [...]
full storyfind number of days in a month from ms sql server
to find no of days in a month in sql apply a simple logic take difference in number of days to the next months date with day that of current date for this use datediff and dateadd functions syntax datediff(d,getdate(),dateadd(m,1,getdate())) here datediff is for difference and dateadd is for fetching next months date
full storyChange Default User for
Syntax: Alter user <user> with default_schema = <schema name> Eg. alter user study with default_schema=study
full storyMy SQL backup From Linux Console
To schedule a mysql database backup it is necessary to take the back up from Console with out prompting pasword, to call crom scheduler crontab Use the following to backup to sql script ]# mysqldump -h localhost -u root -pabcd db> joomla_bup.sql to backup in the name of dates ]# mysqldump -h localhost -u root [...]
full storyComparison b/w MSSQL and Mysql
Database engines are a crucial fixture for businesses today. There is no shortage of both commercial and open source database engines to choose from. Microsoft SQL Server 2005 is Microsoft’s next-generation data management solution that claims to deliver secure and scalable applications while making them easy to deploy and manage. MySQL has long been the [...]
full storyChange MySQL Admin password
[root@fedora12 user1]# mysqladmin -u root password 123456 [root@fedora12 user1]# mysqladmin -u root password 123456 mysqladmin: connect to server at ‘localhost’ failed error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’ [root@fedora12 user1]# mysqladmin -u root -p’123456′ password 123456 [root@fedora12 user1]# When Password is not set [root@fedora12 user1]# mysqladmin -u root password 123456 After Set this [...]
full storyBacking Up MySQL Database
Do you need to change your web host or switch your database server? This is probably the only time when you really think of backing up your MySQL data. If you’ve got a website with a database or your custom database running for your applications, it is imperative that you make regular backups of the database. In [...]
full storyPHP MYSQL CONNECT
<?php $con = mysql_connect(“localhost”,”peter”,”abc123″); if (!$con) { die(‘Could not connect: ‘ . mysql_error()); } // some code ?>
full story