![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Handheld Computer Consoles Have you got a PSP or Nintendo DS if so this is the place for you. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #11 | ||
| MK PitStop Member | Hi everyone, I'm planning on using MySql/Php on either a Windows or, more likely, a Linux base. However, my database will be several thousands of records, in many hundreds of tables, searched using a "Search" query with a regex expression included. I'm wary about the speed penalties, and I would be very grateful if some metrics or timings could be provided....? Many thanks Paul -- http://www.paullee.com | ||
| | |
| Advertisements |
| | #12 | ||
| MK PitStop Member | I am using php to run queries on my SQL For some reason I get many "sleep"ing processes in my DB I am using the following lines to run the queries: $link = mysql_pconnect($db_server, $db_user, $db_password) or die('err'); $res = mysql_db_query($db_database, $sql_string, $link); Any idea what can be done to avoid those hung processes? Thanks in advance niaz | ||
| | |
| | #13 | ||
| MK PitStop Member | need help for update a table in this db: tab1: id F1 1 45 2 52 3 10 4 25 .... tab2: id RIFTAB1 F1_2 1 3 45 2 4 12 3 4 10 4 1 40 5 2 80 .... I want to update every F1 in tab1 with min value of F1_2 where tab2.RIFTAB1=tab1.id : tab1: id F1 1 40 2 80 3 45 4 10 I tried this: UPDATE TAB1 SET F1= (SELECT MIN(F1_2) FROM TAB2 WHERE ???? Thank you in advance. niaz | ||
| | |
| | #14 | ||
| MK PitStop Member | How do I delete the root password from MySQL? I dont want to change it, because I know what the password is. I want it delete it so I can run mysql -u root and get in as root without the need for a password. This is so I can install DBD::Mysql which expects no password to be set for root. | ||
| | |
| | #15 | ||
| MK PitStop Member | I have a database with a table called: RESULTS that has the following fields: DIVISION, NAME, SCORE. I want to SUM up the top 5 scores for each DIVISION/NAME. I cant seem to get anything to work in MYSQL. I have seen a rank function used Oracle and stuff along that line, but not available on MYSQL. Here is what I tried without any luck: SELECT r1.division, r1.name, (SELECT SUM(r2.score) FROM results r2 WHERE r1.division=r2.division AND r1.name=r2.name GROUP BY r2.division, r2.name ORDER BY r2.division, r2.name, r2.score DESC LIMIT 5) AS total FROM results r1 ORDER BY r1.division, r1.name, total DESC; Can anyone get something like this working on MYSQL v5.0? Help. | ||
| | |
| | #16 | ||
| MK PitStop Member | I'm not really sure if my problem lies in the PHP code or the SQL... but here it is: begin(); $query = "UPDATE Nodes " ."SET NodeStatus = 1 " ."WHERE NodeID = $NodeID AND NodeStatus = 0"; $result = mysql_query($query); if ($result == null || $result == false) { rollback(); return; } In the Nodes table, there should be only one instance of a node with a particular NodeID. So, presumably, user1 will hit the UPDATE and change the NodeStatus to 1. Then, when user2 hits the UPDATE, it should fail, since the NodeStatus =1 (and a condition of the update is that the NodeStatus =0). However, when multiple users simultaneously (at least down to the second, according to logs) access the method, they ALL succeed in the UPDATE query. I don't understand how this can happen. I'm assuming that the UPDATE operation is atomic in mySQL. I feel like I shouldn't have to use locks.. but I'm considering it with the terrible results so far. | ||
| | |
| | #17 | ||
| MK PitStop Member | Hi All, hopeing someone can help with a query... I have a query that returns a count of bugs reported from customers and what day of the month they occured on. So I get a resultset such as Count | DayOfMonth 25 | 1 30 | 5 1 | 8 etc.. What I want to do is amend the query so it returns values for "everyday" of the current month. E.g. 25 | 1 0 | 2 0 | 3 0 | 4 30 | 5 and so on... My query as it stands now is select count(id) as "cnt",day(timestamp) as "day" from error_logs where YEAR(timestamp) = YEAR(NOW()) and month(timestamp) = month(now()) group by day(timestamp); Can anyone help me solve this ? Thanks... | ||
| | |
| | #18 | ||
| MK PitStop Member | Hello, I want to do an insert select, where data from one table in one database is copied into another table in another database. The databases are on the same server. The tables have the same structure. I have tried: INSERT INTO db1.table SELECT * FROM db2.table but I keep getting this error: Incorrect table name Is it possible to do an INSERT SELECT with different databases on the same server? niaz | ||
| | |
| | #19 | ||
| MK PitStop Member | hi every body .how are you. if you get an php programme problem . please you can say me i would like to solve this problem. thanks niaz | ||
| | |
| | #20 | ||
| MK PitStop Member | I'm wanting to return all the data from my database for an exact date. My date field is a timestamp. Here is the code that I have been trying to use: select * from production where date like '2007-05-30'; or select * from production where date = '2007-05-30'; Thanks for any help that you can provide. niaz | ||
| | |
| Featured Websites | ||||
|
![]() |
| Tags: console |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| Featured Websites | ||||
|