mysql

Struggling with a MySQL database of phone numbers

My application wants to store a list of international phone number in a mysql database. Then the application would need to query the database and search for a specific number. Sounds simple but it's actually a huge problem. Because users can search for that number in a different format we'll have to do a full scan to the database each ...

MySQL - Multiple result sets

I'm using .NET Connector to connect to MySQL. In my application there are few threads using the same connection, so if a MySQLDataReader is not closed yet and some thread is trying execute a query it gives that error: There is already an open DataReader associated with this Connection which must be closed first. Will there ever be ...

database archive

Hello, I am working on a project about employees and one of the requirement is that 5 years old employees should be archived to a text file somewhere and removed from database. I don't have that much experience with administrating DBs. What is the best way to go about this? Write triggers of some sort? Thanks, Nishant ...

mySql input string was not in a correct format

I've done Microsoft SQL server for years.. but just today tried MySql. The question is with vb.net trying to do a save to MySql. The stored proc looks like this. DROP PROCEDURE IF EXISTS test.spAgency_Save; create procedure spAgency_Save (IN p_intTblAgencyID INT, IN p_vcAgency varchar(20),IN p_dtmDate datetime, OUT p_Output INT) begin...

rand() faster mysql php function

Hi How do I select wallpapers randomly, but cache the last selected one for 10 seconds (for performance reasons)? the faster RAND() function use Cache in wallpapers or image i use this but i need to but cache in image timely change after 1 mins or 5 mins to chnage images in RAND() randoms wallpapers i use this : $sql_wallpaper = "S...

solution to perform lots of calculations on 3 million data points and make charts

i have an excel spreadsheet that is about 300,000 rows and about 100 columns i need to perform various functions on this spreadsheet and out of this spreadsheet i need to create about 3000 other spreadsheets which are SIGNIFICANTLY smaller for every created spreadsheet i will need to have a separate powerpoint file that will have an au...

php error query was empty

You can see I can successfully redirect values from one to this page. $shipping_first_name = $_POST['shipping_first_name']; $shipping_address= $_POST['shipping_address']; $shipping_city = $_POST['shipping_city']; $shipping_state = $_POST['shipping_state']; $shipping_zip_code = $_POST['shipping_zip_code']; $shipping_phone = $_POST['shipp...

Handling MySQL datetimes and timestamps in Java

In a java application what would a good compromise in terms of extracing and inputting date information with a MySQL database using a mix of datetimes and timestamps? ...

INSERT ... SELECT, WHERE

I have two tables, one called countries and one called country. Countries has both countries and states, but no ISO for the countries. The country table has the country names with ISO, but no states. I'm trying to do an insert select to update a new ISO column in the countries table and populate it based on the country table (in other...

Help on displaying data in colunm PHP MySQL (Modified Preorder Tree Trasversal)

Hello I'm trying to get a multicolumn display (if it can be called so) with the code below here is the result: . Someone can see why These leaves are broken? or tell me please which is better: a catagory table linked to a subcatery one, or an adjacency model list. $stmt = $conn->prepare("SELECT node.idCat_ad ,node.".$cat_name.",(COUNT...

How to display a MySQL database record only once when duplicates exist in PHP?

Suppose my db looks like this: id | person_id | hobby | time ----------------------------------- 1 | 67 | golf | mon 2 | 33 | reading | tues 3 | 67 | baseball | fri 4 | 67 | golf | sun I want to display a list of all the hobbies of person with id 67 on a page. If I do this: ...

How can I order mysql results in the same sequence as my OR statements?

I have an array of IDs that are already sorted in descending order as to their relevancy, but I need to make a query to get the details of each ID. How can I get the results to return so that they are in the order of my Where statement? SELECT DISTINCT `content_object_set_instances`.`id` AS content_object_set_instance_id, `content_obje...

python mysqldb cursor messages list shows errors twice

For some reason whenever i run a query on the db cursor, it generates two errors in its .messages list, is this a feature? here is the code that runs the query, all the application does is open a connection to the db, run this once with a forced error, read the .messages, then exit import MySQLdb class dbobject: def __init__(self,...

mysqldump of a database by a user with columnar priveleges

Is there a way to ignore certain fields of a table using mysqldump without creating a view? ...

List of things to keep in mind while using transactionscope (asp.net) with mysql?

Hi, Since I am gonna start using transaction scope in my application, I would like to know if there is anything in particular that I should keep in mind while coding the app. The DB is mysql. Thanks! ...

Difference between mysqltransaction object (mysql) and transactionscope object (asp.net)

Hi, Can you guys tell me the difference between these two objects? Thanks! ...

how to do mysql select query on two tables linked by another table

Suppose I have a table whose function is specifically to link two other tables in terms of OOP So suppose that I have two tables: one for person's name and another one for phone numbers Table 1: id person's name 1 John 2 Smith Table 2: id Phone number 5 23424224 6 23424242 And then I have a third table that links ...

How common is MySQL traditional mode in the wild?

I was recently having a discussion with someone in which they kept insisting that I had to allow for certain exceptions due to the existence or use of MySQL traditional mode. In my experience, I have never come up against MySQL traditional mode and wonder how common it is. Anybody render an estimate based on your experience? ...

Need some guidance on a transactional problem (mysql and asp.net)

Hi, Suppose say I have a main function (or in the code behind) In this function, the TransactionScope is say ReadCommitted This main function calls 3 other functions. All these three functions, do a DB operation. The first function increments a sequence number (not auto increment). So, it has its own TransactionScope with isolation le...

MySQL Query GroupingSubQuery Question

Hello, I am having trouble getting my head around this query for some reason and I was wondering if someone would be able to help me out here. I have the following 3 tables: opp_cstm: id_c make_c time_followup_c lead_category_c lead_type_c 9 GMC 224 GM Internet Sales e Buick 8...