SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 0
Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this i
It's easy to find duplicates with one field: SELECT name, COUNT(email) FROM users GROUP BY email HAVING
I have a .sql file with an export from phpMyAdmin. I want to import it into a different server using the comma
How can I add a column with a default value to an existing table in SQL Server 2000 / SQL Server 2005?
In SQL Server, it is possible to insert rows into a table with an INSERT.. SELECT statement: INSERT INTO Table
Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in?
I have to retrieve a MySQL database information from master database and then connect to that database, and fe
I have the following php-codeigniter script which attempts to increment a field of a record using active-recor
I just inherited a project because the last developer left. The project is built off of Code Igniter. I&apo
I have a very small script to get all records from a database table, the code is below. $query = $this->db-
I'm using CodeIgniter's Active Record class to query the MySQL database. I need to select the rows i
I want to insert current time in database using mySQL function NOW() in Codeigniter's active record. The
I have a sql statement in my model, I then say $query = $this->db->query($sql, array(fields, fields1);
I'm passing a large dataset into a MySQL table via PHP using insert commands and I'm wondering if it
I have an insert query (active record style) used to insert the form fields into a MySQL table. I want to get
I started by googling and found the article How to write INSERT if NOT EXISTS queries in standard SQL which ta
I am trying to select data from a MySQL table, but I get one of the following error messages: mysql_fetch_
Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS att