How to store the php result of md5("test", true) in a BINARY field of a MySQL MyISAM table
How can I store the result of: $store = md5("test", true); mysql_query(...) in a mysql db with a string query? ...
How can I store the result of: $store = md5("test", true); mysql_query(...) in a mysql db with a string query? ...
I have an int field in my table scores. It can be a number between 0 and 100. There are over a 1000 rows in that table. I want to select the number of rows that fall between ranges 0-25, 26-50, 51-75 and 76-100. So basically, if this is my scores table score (int) ------------ 10 20 12 56 43 90 87 The output of the query shoul...
Previously the column Data type is Date now I am changed to Timestamp Now if I tried to run the program am getting them exception java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 12 to TIMESTAMP. at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1298) at com.mysql.jdbc.ByteArrayRow.getTi...
Hello, another Entity Framework (ADO.NET) question from me. I'm using EF1 (no choice there) and have a MySQL database as a backend. A simple question I can't really find a satisfying answer for: What exactly do I have to do for loading? IE., when I have an entity and want to enumerate through its children, say I have the Entity "Group"...
hi, I have a logfile which logs the insert/delete/updates from all kinds of tables. I would like to get an overview of for example the last 20 people which records where updated, ordered by the last update datetime DESC What I have now is: SELECT DISTINCT logfile.idvalue, DATE_FORMAT(logfile.logDateTime,'%d-%m-%Y %H:%i') AS thedateti...
I have to find out if there are entries in a table that also exist in a list I have in Java. The logical solution would be "SELECT column FROM table WHERE column IN (?)" and then set ? to the array I have in Java, but setArray asks for a java.sql.Array and I'm not really sure how to obtain one and if it really is what I am looking for. ...
I was wanting to create a personal note database, to store notes in HTML or text that are quite long. What would be the difference between VARCHAR and TEXT fields, which one would be more efficient to use? I think VARCHAR's max is 65535 characters, I can't wrap my head around if I'll contain anything larger than that though. I wonder if...
I need to store set value in MySQL column. I completely like the build-in SET type, but it seems that FIND_IN_SET() function requires table scan which is bad. It seems that SET uses binary values under the hood. If I use binary value to represent a set, for example for a set of four elements it could be something like this: 0100 0101 0...
Please HELP! :( I am looking to develop a PHP Script to do the following: Scrap a remote HTML page and extract selected data (e.g. particular table/div) Use extracted data and save it into a Database (e.g. MySql) Anyone can help out? Thanks and appreciate your soonest feedback. ...
I am trying to discover the best way to design my database to organize information related to events. I have an events table which contains all the information about the event such as, a unique id, title of the event, venue etc. Now each event can have multiple ticket types and the number and type of tickets will change with each event...
HI I Need to display an image when Category Update and that image display upto 3 days i use this but not work $todaytime = time(); $timestamp = $show_wallpaper['timestamp']; $timediffirence = "360000"; $minus = $todaytime - $timestamp; if ($timediffirence > $minus) { $new =...
In performance terms, what will be faster, use a BIT(1) NULL (null = unknown, 0 = male, 1 = female) or ENUM('unknown', 'male', 'female') NOT NULL DEFAULT 'unknown' in MySQL MyISAM? Or this is considered micro-optimization? [EDIT] I think I'm going to use ENUM('male', 'female') DEFAULT NULL ...
can anyone generate a query for me. Lets say i have a table sales(saleID, date_of_sales, customerID, itemID, saleprice) date_of_sales is the datetime field which stores the time of the sale. customerID is self exlpaining tells to whom item was sold. itemID is ID of the item sold. saleprice is the price that the item was sold. I ...
Hi, I have been writing a lot of code for work in PHP/MySQL. So far it has all been procedural making use of functions for functionality occuring multiple times/places. Starting to find some of the site hard to manage - time to go OO. I want to learn about MVC with object oriented PHP & MySQL. I have some experience in Java and MVC but...
I am building a little daemon which periodically (every 30 seconds) checks for new data and enters it in a local MySQL Database. I was just wondering whether it was better to create a connection to the database when the application launches and always use that connection throughout the application until it is closed, or if it should onl...
I have a sql database and am wondering what command you use to just get a list of the table names within that database. ...
I need to write a python application with use both of the mysql and sql server is there a general python module or library that can access both mysql and sql server as DBI with perl or should i use 2 libraries and if yes which libraries do you recommend . ...
I have a table with the following design: ID OPT_1 OPT_2 OPT_3 A_ID 1 3 4 3 1 2 5 2 1 1 3 1 2 2 1 I want to select all OPT's for A_ID 1, but when I run the query, I don't know the A_ID, I only know the OPT's. So how can I insert a variable to get ...
Currently I have a query that returns parent data for parent records that have a subset of child table records equaling certain values. However, I want to narrow it to only return those parent records with children having certain values, but where those are the only child records belonging to given parent or where the number of child re...
I need to execute this simple mysql query in Zend; "UPDATE `table` SET `field`='field'+1 WHERE `field`>'" . $var . "'" How can I do this with Zend update; $this->update($data, $where); But we hasn't data, we have only where. ...