Hi,
I am doing some unit testing for a DAO that works with postgresql. Some of the SQL queries that my DAO uses involve the DATE function. Is there an in-memory database that supports functions similar to the ones that postgresql does?
Currently I am looking for support for the DATE function however, I obviously can see myself using other functions in the future.
I need to know how many records are in each table in a particular database. I don't care what is in the record, they will all need to be counted.
I already know how to do this for a single table as SELECT Count(1) FROM [my_table_name], but this gets a little redundant for 200+ tables.
I get multiple text files daily to update my database from my client side and I am not a DBA expert. Every day I update it manually. Is there any method I can use to make this easier? I think there is a way to automate it but I don't know exactly what to do.
In MySQL you can insert multiple rows like this:
INSERT INTO 'tablename' ('column1', 'column2') VALUES
('data1', 'data2'),
('data1', 'data2'),
('data1', 'data2'),
('data1', 'data2');
However, I am getting an error when I try to do something like this. Is it possible to insert multiple rows at a time in an SQLite database? What is the syntax to do that?
Im using c# .net windows form application. i have a SQL database with 5 tables. i need to populate a combobox with these table names. only names should be displayed.
if i have mssql database with record displayed below :
Id Serv-code Value
1 100 3
2 100 4
3 100 3
4 100 3
5 101 5
6 101 5
the logic i want when i search for the record using serv_code 100 then the output will be the average means 3 will be displayed in textbox because the value 3 will be entered 3 times than 4 as shown above .... and if if i search record with serv_code 100 and if the value of serv_code is equal means 3 and 4 only then the recent entered value will be displayed in textbox..
I am using a form to get the hour and minute using post method and then store it to mysql DB.
Such as :
$hour = $_POST['hour'];
$minute = $_POST['minute'];
** There is no need of date, month and year. I just need to store the hour and minute in a column of a table (ex: exam_time)
Column structure: exam_time time NOT NULL
Now how to store these value into database using mktime() function. I tried but it stores 00:00:00, not the one which I am sending via form.
I am building an app that has a daily quote that should be stored in the database. Each quote is assigned with a day of the year, including one for Feb 29th. Since the quote only cares about the day not the year should I still use smalldatetime type? Please let me know your opinions, thanks!!
hello, I want to save a query only one time in the database, this is my code:
$querystat = mysql_real_escape_string($_GET['q']);
$datetime = time();
if( ($querystat != $_SESSION['prev_search']) OR ( ($datetime - $_SESSION['datetime']) > 60) ) {
$insertquery = "INSERT INTO `query` ( `searchquery` , `datetime`) VALUES ( '$querystat' , '$datetime') ON DUPLICATE KEY UPDATE searchquery='$querystat';";
mysql_query($insertquery, $db);
}
maybe something with == 0 ?
I'm currently researching the best way to approach building a javascript widget someone can embed on their site, which would retrieve and display information from an external MySQL database.
The gist of the widget would mimic the needs/functionality of Twitter's widget (http://twitter.com/about/resources/widgets), where it uses some combination of JS, PHP and/or AJAX and retrieves information from a MySQL DB with secure (or at least somewhat safe) cross-browser access. Thoughts or ideas on the best and most reliable way to approach something like this?
I am creating application for MAC using cocoa framework, I would like to know how and what are the ways i can connect to MySql database using cocoa framework.
I want to set the value of the column 'character_hold' to 'no' for all my rows in my MYSQL database. Is there a SQL statement I can use in phpmyadmin to set them all to 'no'?
Hi all !
I'm using the Sequel (Taps) ruby gem for a remote backup of my production database (PostgreSQL).
I wonder if storing that backup with SQLite is a good solution.
What's your feeling ?
Thx !
I have a site im running through an iframe in a uiwebview for a native iphone app, the problem is that I guess since the iframe and the html page are on different servers the session will not keep its state. My thought is to store the session data to the database and then just use the stored session data. Is this possible? If so can anyone send me to a guide on how to set up stored sessions with zend framework, I can't seem to find a good example. thanks
I need to have hibernate database config set from outside text file, how can I do it? Is there some kind of method for this, or do I have to make my own?
Looking to store usernames and passwords in a database, and am wondering what the safest way to do so is. I know I have to use a salt somewhere, but am not sure how to generate it securely or how to apply it to crypt the password. Some sample Python code would be greatly appreciated. Thanks.
i have some apache logs and i want to be able to query the data in it.
so i wanted to know if its possible to convert this log data to a relational database so i later can query and analyze the data using sql statments.
thanks
We are using Eclipselink for ORM, but we have a need for some more lightweight database interactions that are more equivalent to JDBC. My question is whether Eclipselink supports such an idiom and whether there are any advantages of it to straight JDBC. I can see one advantage being consistency and being able to use the existing connection handling. Others?
Specifically, what I'm looking for is something equivalent to Hibernate's Native SQL Query.
My table has records for every minute (for instance the column name is date), now I want to fetch records with an interval of 5 minutes!
Can it be done at database level?
I am using Django with MySQL