mysql timestamp convertion
What is the correct way to convert from mysql timestamp (YYYY-MM-DD HH:MM:SS) to my own chosen format, something like "August 5, 2010"? iow how can I make the mysql timestamp php date() compatible? ...
What is the correct way to convert from mysql timestamp (YYYY-MM-DD HH:MM:SS) to my own chosen format, something like "August 5, 2010"? iow how can I make the mysql timestamp php date() compatible? ...
Using C# & Mysql I have combobox & button in my webpage, if i select a value from the combobox, then i click the button the page is refreshing, combobox value is changing. For Example Combobox value: 1, 2, 3, 4 ..... If i selected 2 then i press the button, webpage is refreshing, combobox values is display from: 1, 2, 3, 4.... Combo...
I have 3 tables, networks, nodes, networknodes, networkconnections. networknodes has 3 fields network_node_id, network_id, and node_id, the last two are forien key references to network. and a network may include multiple copies of same node (but with diffrent network_node_id) networkconnections has the fileds networkconnection_id, sta...
Hello all, I am working on a filtering section with "large" tables and performance (for SELECT) is of great concern. table_1 has 710,000 records and looks like this: (PK) game_id param_1 param_2 param_3 table_2 has 42,218,503 records and looks like this: (PK) set_id value_1 value_2 table_3 has 56,312,204 records and looks lik...
Hi, I want to manage a username session for lifetime. means for example if u look a website http://www.kongregate.com/ in this website i have registered and i haven't logged out but whenever i open up this website my username appears there. No need to login again. so i want to do the same for my one of the games website. i have develope...
Hi there, I'm trying to perform a select query over two tables, one containing, for example, products, and the other containing the colors that can be chosen for those products. Each product has a different number of colors that can be chosen; some have only one color, others can have 20 of them. The scope of the query is to parse a l...
SELECT "D"."Name", "D"."Sname", "D"."Date, "D"."Type", "D"."Place", "D"."Unit1", "D"."Unit2" FROM "Data" AS "D", "Search" AS "S" WHERE "D"."Name" = "S"."Name" AND "D"."Sname" = "S"."Sname" AND "D"."Place" = "S"."Place" ...
I have a page with ten sortable lists that properly save the order of list items(divs) as they are moved inside their list. Each list itself is generated with a separate php file that basically iterates content based on its boxid #. So all content with a boxid of 5 gets output to list 5. All content with boxid of 3 gets output to list 3 ...
Here's my query for the curious. Only the first and last lines should bear on this question: SELECT s.parent_id AS id, COUNT(s.parent_id) as count FROM items i LEFT OUTER JOIN (SELECT item_id, user_id, MAX(created_at) as created_at FROM item_views iv WHERE iv.user_id = ? GROUP BY item_id) AS v ON i.id = v.item_id LEFT ...
When I insert 78.9 into Mysql (using JDBC) it gets rounded up to 79? Is this normal ... if so how can I stop this from happening. More details: Column name: num Data type: decimal(12,0) * The above item was copied from phpMyAdmin Query is stmt.executeUpdate("INSERT INTO triples(sub_id, pro_id, num) VALUES("+subId+","+proId+",78.9)");...
I have a page 3 datacontrols (in order, datalist->grid->listview, the selection from one feeds into the next) works perfectly locally, using dot net connector for mysql. My webhost uses ODBC, and I had to remove [ ] from the select statements in my code and put the table names. I removed the [ ] 's and my page runs, and my 1st/datalis...
Hi there, I want to select some entries based on a max+sum condition. mytable ---------- id | col1 | col2 I want to select all entries that have the sum of col1 & col2 greater than or equal to the max of sum minus X. (don't ask me why :) ) So far I managed to get the sum OK (hereafter aliased as "total") with: SELECT id,SUM(col1 +...
Hello, Can someone advise me if I am performing the below steps correctly: When a user wants to register on the website, register.php handles his/her request. Below is some of the code from register.php: $sql="INSERT INTO Members (fldFullName, fldEmail, Password, Gender, DOB) VALUES ('$fname','$email','$pass', '$gender', '$date')"; ...
Hi, I am having some confusion with a mysql query. Any help appreciated. My current query: SELECT r.name , r.network , i.name , d.dtime , d.input FROM router AS r INNER JOIN interface AS i ON r.rid = i.rid INNER JOIN 1273118400_1_60 AS d ON i.id = d.id AND dtime BETWEEN 1273152000 AND 1273153800 WHERE i.status = "active" Now I am ...
Hi, i've got to connect 2 php pages on 2 different servers, in the first server there's the DB (mysql) with an "email" table, generated by a php page.. in the second server there's a php file wich needs to read the "email" table... the second php page doesn't need to be opened by the user the fact is that i need to make this work wit...
I am using MySQL v5.1.36 and I am trying to create a stored function using this code. DELIMITER // CREATE FUNCTION `modx`.getSTID (x VARCHAR(255)) RETURNS INT DETERMINISTIC BEGIN DECLARE y INT; SELECT id INTO y FROM `modx`.coverage_state WHERE `coverage_state`.name = x; RETURN y; END// When entered into the...
I am making a new database for an online store and Am trying to figure out how to do the orders table. There are multiple products and each product has many options. I am just wondering the best way to keep track of all this. I keep coming back to a table with all the options for all the items. This seems like a bad thing though. Does an...
I am trying to insert couple of words in mySql database via php with flash interface. Since the words are in foreign language some of the letters are typed as ' and ". When I try to insert these letters I get error from mySql/php. Can letter(symbols) like mentioned above be inserted in mySql? If yes, what changes do I need to make (Acti...
I'm using the latest version (6.2.3) of the net connector. According to the documentation an option exists called "Reset Pooled Connections". I have tried to disable this using the following connection string: Data Source=DB;Database=DBName;UID=username;PWD=password;Max Pool Size=100;charset=utf8;Reset Pooled Connections=no; I have ...
I want to get surrogate keys for my user table(s) in MySQL. I'm sure concatinating an incrementing value + a timestamp would get me unique keys across multiple tables but how do I get the incremental value for the class's persistence table before I persist it to the database. ...