mysql date input
I have a database table--> date field and the date format is yyyy-mm-dd if i input in anouther format then field show 0000-00-00 what is the problem and how i can overcome this whereas i have use no form encode method?? ...
I have a database table--> date field and the date format is yyyy-mm-dd if i input in anouther format then field show 0000-00-00 what is the problem and how i can overcome this whereas i have use no form encode method?? ...
Hi. I am using MySQL for my database. I have a requirement to store a list of users in the system. The user will have both first name and last name. I cannot have the first name and second name as the primary key. So I need a indexing key. But I do not want to enter the index value every time to add a new row. I want the system to ha...
Hi all! First of all sorry for my English, it's not my native language. So, I am planning to make an application (PHP/MySQL) which deals a lot with money, and I am thinking about how to store and operate with the money, referring to PHP float data type and MySQL decimal. I was thinking of two options. One of them is to operate and st...
ifconfig -output is somewhat messy thing to look at. When I saw the nice output below with the command (source), the question emerged: Is there some more structured way, let say MySQL, to look at ifconfig or similar data? It would be cool, if I could monitor the network traffic in databases. [prompt]$ mysqladmin -h localhost -u...
You may notice from my last question that a problem caused some more problems here. My database is now unusable partly due to my interest to break things and my inability to look at error messages. I know that I should not reuse primary keys, but I would like to use them again after the removal of the database that I deteriorated. So H...
I am rather confused by the hurt-mongering here. I know how to do them, see below, but no idea why? What are they for? create table orders (order_no int not null auto_increment, FK_cust_no int not null, foreign key(FK_cust_no) references customer(cust_no), primary key(order_no)) type=InnoDB; create table orders (order_no int not nul...
I cant seem to get this working, i need to display the Total Order Amount per day on the Chart. I got the Open Flash chart to work by the following code: <?php // Settings for Database Connection include_once($root_folder_path . "includes/common.php"); include_once("./admin_common.php"); include_once("./ofc_chart_library/open-flash-...
So I've asked a couple of questions about performing joins and have had great answers, but there's still something I'm completely stumped by. I have 3 tables. Let us call them table-b, table-d and table-e. Table-b and table-d share a column called p-id. Table-e and table-b share a column called ev-id. Table-e also has a column called da...
I am trying to find out the difficulty of implementing a queue system. I know how to implement a basic queue, so i'll explain a little about what i'm after with some background: I will be implementing a queue where messages will be placed, this will come from several users, the messages will be scheduled to be posted at user defined tim...
I found a perl script that manages randomizing the wikipedia articles in Wikipedia here. The code seems to be slightly computer generated. Due to my present interest in MySQL, I thought you could possibly have the links and related data in a database. I know that MySQL is good in maintaining relations between tables, while it seems you ...
Hi, I was wondering (and used Google with no clear result) if there is any way to connect to a MySQL database with PHP using a hashed password. Say I have the following: Password (plain): 'foobar' Password (sha1): '8843d7f92416211de9ebb963ff4ce28125932878' Now I would like to connect to MySQL like this (using the mysql_* function as ...
Hello I would like to know how to display orders placed on a certain day. For example: I would like to display orders placed today. My MySQL database contains the following tables: 1) orders 2) orders_statuses Under orders, I have the following fields: 1) orders_id 2) orders_placed_date Under orders_statuses, I have the followin...
I created far too big fields. I thought it would be cool to store PHP snippets to the db with the snippet, its source and its comment. You can see the problem, the showing of long fields: +--------+-------------------------------------------------------------------------------------------------+------------------------------------------...
This question is based on this thread. Problem: to access MySQL's manual when the cursor is at the beginning of the word by Ctrl-A Esc Ctrl-m where m reminds about Mysql. How can you build a Vim-like K in Screen for MySQL's manuals? ...
I have a website that lets people view rows in a table (each row is a picture). There are more than 100,000 rows. You can view different subsets of the rows, and you can view them with different sort orders. While you are viewing one of the rows, you can click the "Next" or "Previous" buttons to go the next/previous row in the list. ...
Whilst testing a Solr install for a future MySQL -> Solr migration, it's immediately apparent that the "rules" for what constitutes a good data stucture, and by extension an efficient search, are very different in Solr when compared to an RDBMS like MySQL. The most obvious thing being that data isn't (or doesn't seem to be) normalised to...
Hello Can anyone list the requirements (i.e. any books, tutorials, libraries etc) to build an application in Java, which could communicate with my MySQL Database which is running on web. I am running an online webstore built in PHP and MySQL. I would like to build a Java Application through which I can (CRUD) Products, Categories, Orde...
I use the following code for transaction in Zend Framework but the rollback function doesn't work (Data is inserted into the database by insertSome($data)). What's wrong? $db->beginTransaction(); try{ $model->insertSome($data); $model->insertAll($data2); //this line cannot be run and the whole transaction should be rol...
Now I know how one can execute mysql queries \ commands from bash : mysql -u[user] -p[pass] -e "[mysql commands]" or mysql -u[user] -p[pass] `<<`QUERY_INPUT [mysql commands] QUERY_INPUT My question is : How can I capture how many rows where affected by the query? I tried doing: variable='`mysql -u[user] -p[pass] -e "[mysql comm...
Is it possible with a mysql script, full of just mysql commands that get filtered into the mysql binary, to do a count of current records in insert into a stats table, perhaps with the time and date automatically generated? I would want to do this, so calculations could be done, eg work out the total number of new records inserted in a...