Running Average
How can I get mysql to do a running average of a given field using dates from another column so that the average for each element is for a given time period rather than from the 5 rows next to the element?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Running Average
How can I get mysql to do a running average of a given field using dates from another column so that the average for each element is for a given time period rather than from the 5 rows next to the element?
Best Average
OK. Bit of a maths question (at which I am useless) Basically i've got a table with avg_rating and users. avg_rating is the average rating of a specific id and users is that amount of people who have voted. I'm trying to sort the list by the best rating. However, if 50 users have voted an average of 2 for one id but only one user has voted 5 for another id, this id would be 1st on the list. Is there a way I can sort the table by the best avg compared to the total of users that have voted?
Average Age
I have a dating script running which uses MySQL to store the users and their information. Now that I have some users, I would like to create a PHP file to show some site statistics. Actually I would like to get the average age of the users that are stored in the database, for example something like Average age: (At this point I would just like the average age, for example 27.33) Is this possible in some way?
Average Age
I got this players table and I do want to list its average age... SELECT AVG(YEAR(SUBDATE(CURDATE(), TO_DAYS(birth)))) FROM players This works fine for me BUT, it doesn't on my server though it isn't 4.1.XX as it is on my computer at home...
7 Day Average
I don't know if this can be done but I'm looking to write a query that selects the LAST 7 records the and gives me an AVERAGE. Basically I have a table which logs the number of hits each day, I want to select the last 7 and see what my average is. How do i write something like this? there is is only 2 fields in the counter table called date and counter.
Returning A One Value Average
I'm using PHP and MySQL, and am trying to return an average (songle value). My code isn't working, and I'm getting confused between the mysql_fetch, here's my code: $average = "SELECT AVG(overall) as overall, AVG(gameplay) as gameplay, AVG(graphics) as graphics, AVG(sound) as sound FROM VIDEO_GAME_DETAIL WHERE name=" .$row['name']; $result = mysql_query($average); $rating = mysql_fetch_array($result); // down in an HTML table echo "<td>" .$rating['overall']. "</td>"; $row['name'] is the name of a PC Game from the VIDEO_GAME table. In the VIDEO_GAME_DETAIL table I have reviews for many games, with ratings. My goal here is to average the different ratings (overall, gameplay, sounds and graphics) for a one game, and stick them with the main page that lists the games (1 row per game). I get this following error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /Users/Marconi/Grad/lleccia/www/ISYG250/proj4/reviews.php on line 54 line 54 is $rating = mysql_fetch_array($result);
Average From Two Tables
I've two tables storing the scores of test marks. The following show the selected scores from the two tables of a certain person with id=1 and level=5: # table1 id level score 1 5 80 1 5 80 1 5 100 # table2 id level score 1 5 40 1 5 60 1 5 50 1 5 70 The sum from table1 is 260 and the sum from table2 is 220 for a total of 7 tests. The grand total is 480. I would like to be able to obtain the average of 68.57 (480/7) for a particular person of a particular level. Would I be able to do that with a single SQL? I've tried a number of sql queries but the don't work.
Average Length
Basiically I have a table called ‘Members’ with the following attributes, (the m is short for member), Members (mno , mname, date_joined, date_left, maddress, mtel) I need to produce a single SQL statement that will output the longest length of current membership, the shortest length of current membership and the average length of current membership.And the out put I get should be easily understood, not just a number if you what i mean.
How Many Is Too Many Queries On The Average Web Page?
I'm just curious... I'm trying to watch how many queries I run in any given page. But I find myself being too conservative sometimes, trying to think of better ways to do things... but then end up getting frustrated. Just looking for some average feedback. In your opinion or experience, how many queries to the DB using PHP is too many queries? I know less is better... i'm just trying to get an idea.
Query Fetching Average
I have 2 tables in a database. One table consists of persons. Each person appears only once in the table.....
Average Of Grouped Fields?
SYSTEM MOUNT KB_USED KB_TOTAL host_1 / 1000 30000 host_1 / 1500 30000 host_1 /apps 1092 234343 host_1 /apps 7266 234343 host_2 / 4598 553444 host_2 / 4545 553444 host_2 /opt 3435 435345 host_2 /opt 4534 435345 What i want is, something like this SYSTEM MOUNT AVG(KB_USED/KB_TOTAL)*100 host_1 / 4.166 host_1 /apps 1.78 host_2 / 0.82 host_2 /opt 0.91 How do I do this? Basically I want them grouped by mount per system.
Average Over Results From Query
I would like to write a query in which i calculate the average over the result from an earlier query. I have a transaction header table and a separate transaction lines table. I am trying to count an amount per transaction by summing the lines table, grouped by transactionnumber and would like to calculate the average over all of these sums.
Average Time Query
I have come stuck with averaging a column with type of Time. I know there is a function AVG() that I can use to filter the average of a column, however, this brings back an integer. Is there any way to return the average in time format (IE 00:00:00)? BACKGROUND INFO: SELECT `estimatedTime` FROM job_sheet; Returns, 01:00:00 21:30:00 01:00:00 The data type is time, and the default is 00:00:00.
High Average Load (50%)
I have a Windows 2003 server with MySQL 5 installed (5.0.19). The server has a 3ghz processor and 2gb of memory. The server has about 20 databases of the type MyISAM and there is almost no load trough queries. The mysqld-nt.exe process has an average load of 50% and goes up when a query comes in. Why is this? I have tried logging to see what MySQL is doing but I cannot find anything abnormal.
Average Time Difference
I have a table which includes two timestamps - creationTS and processedTS. I want to run a query that tells me the average difference between these two timestamps on a minute by minute basis, i.e. one row for each minute of the day, containing the total messages created in that minute and average amount of time it took to process data created in that minute. Is this possible in a query, or do I need to grab each entry and use PHP to work out the average processing time?
Average Number Of Records
Say I have 10,000 records, each with a UNIX_TIMESTAMP()'d date field, and want to know the average on how many records have been created each a 24 hour period for the past 3 months. How would I go about doing that? I tried the following but receive a group by error: SELECT AVG(COUNT(*)) FROM my_table WHERE date >= TIMESTAMPADD(MONTH,-3,FROM_UNIXTIME(UNIX_TIMESTAMP())) GROUP BY id
Result With The Highest Average
I need to return the result with the highest average which should be calculated by dividing total_value by total_num_votes. How can I do the division in the query to get the result with the highest average: ( total_value / total_num_votes ) I'm guessing it should look something like this: SELECT ( total_value / total_num_votes ) as average FROM ratings ORDER BY average LIMIT 1
Average Query Execute Time???
I have a query taking about 4 sec that gets only 18 records.. That's not good. What can I do to speen up my Query? <CFQUERY DATASOURCE="#datasource#" NAME="qry_job_search"> SELECT DISTINCT (t1.JobPostId), t1.Actionlkp, t1.Date, tbl_job_posting.*, tbl_job_post_requirements.*, tbl_employer_info.*, tbl_employer_url.*, tblkp_employment_type.*, tblkp_education_exp_lvl.*, tblkp_salary_range.*, tblkp_employment_exp_lvl.*, tbl_job_post_location.*, tbl_job_post_job_categories.JobCat, tblkp_countries.*, tblkp_prefectures.* FROM tbl_job_post_history AS t1 JOIN tbl_job_post_location ON tbl_job_post_location.JobPostID = t1.JobPostID JOIN tblkp_countries ON tbl_job_post_location.CC1 = tblkp_countries.CC1 JOIN tblkp_prefectures ON tbl_job_post_location.CC1 = tblkp_prefectures.CC1 AND tbl_job_post_location.PrefectureID = tblkp_prefectures.ADM1 LEFT JOIN tbl_job_post_requirements ON tbl_job_post_requirements.JobPostID = t1.JobPostID LEFT OUTER JOIN tbl_job_post_job_categories ON tbl_job_post_job_categories.JobPostID = t1.JobPostID JOIN tbl_job_posting ON tbl_job_posting.JobPostID = t1.JobPostID JOIN tbl_employer_info ON tbl_employer_info.UserID = tbl_job_posting.UserID LEFT JOIN tbl_employer_url ON tbl_employer_url.EmployerID = tbl_employer_info.EmployerID JOIN tblkp_employment_type ON tblkp_employment_type.ID = tbl_job_posting.EmploymentType JOIN tblkp_education_exp_lvl ON tblkp_education_exp_lvl.ID = tbl_job_posting.EducationExpType JOIN tblkp_salary_range ON tblkp_salary_range.ID = tbl_job_posting.Salarylkp JOIN tblkp_employment_exp_lvl ON tblkp_employment_exp_lvl.ID = tbl_job_posting.EmploymentExpType WHERE t1.JobPostId NOT IN ( SELECT DISTINCT (JobPostId) FROM tbl_job_post_history WHERE Actionlkp =4 AND date = ( SELECT MAX( date ) FROM tbl_job_post_history WHERE JobPostId = t1.JobPostId ) AND JobPostID = t1.JobPostID ) AND HistID = ( SELECT MAX( HistID ) FROM tbl_job_post_history WHERE JobPostID = t1.JobPostId AND Actionlkp =1 ) AND Date >= ( curdate( ) - INTERVAL 30 DAY ) <CFIF SESSION.COUNTRY_A NEQ "" AND SESSION.PREFECTURE_A EQ 0 AND SESSION.CITY_A EQ ""> AND tbl_job_post_location.CC1 = '#SESSION.COUNTRY_A#' <CFELSEIF (SESSION.COUNTRY_A NEQ "" AND SESSION.PREFECTURE_A NEQ 0 AND SESSION.CITY_A EQ "") OR FORM.PREFECTURE NEQ 0> AND tbl_job_post_location.CC1 = '#SESSION.COUNTRY_A#' AND tbl_job_post_location.PrefectureID = '#SESSION.PREFECTURE_A#' <CFELSEIF SESSION.COUNTRY_A NEQ "" AND SESSION.PREFECTURE_A NEQ 0 AND SESSION.CITY_A NEQ ""> AND tbl_job_post_location.CC1 = '#SESSION.COUNTRY_A#' AND tbl_job_post_location.PrefectureID = '#SESSION.PREFECTURE_A#' AND tbl_job_post_location.PostCity LIKE '%#SESSION.CITY_A#%' </CFIF> <CFIF (SESSION.CATEGORY_A NEQ 1) OR FORM.CATEGORY NEQ ""> AND tbl_job_post_job_categories.JobCat = '#SESSION.CATEGORY_A#' </CFIF> <CFIF (SESSION.KEYWORD NEQ "") OR FORM.KEYWORD NEQ ""> AND t1.Actionlkp = 1 AND (tbl_job_posting.JobTitle LIKE '%#session.Keyword#%' OR tbl_job_posting.JobDescription LIKE '%#session.Keyword#%' OR tbl_job_post_requirements.JobRequirements LIKE '%#session.Keyword#%') <CFIF SESSION.KEYWORD NEQ "" AND SESSION.PGV NEQ "brief"> <CFSET SESSION.PGV = "detailed"> </CFIF> </CFIF> <CFIF SESSION.EMP_TYPE_A NEQ 1> AND tbl_job_posting.EmploymentType = '#SESSION.EMP_TYPE_A#' </CFIF> <CFIF SESSION.EXP_LVL_A NEQ 1> AND tbl_job_posting.EmploymentExpType = '#SESSION.EXP_LVL_A#' </CFIF> <CFIF session.SRT EQ "D"> ORDER BY Date DESC <CFELSEIF session.SRT EQ "C"> ORDER BY tbl_employer_info.CompanyName <CFELSEIF session.SRT EQ "L"> <CFIF form.country NEQ 0> <CFIF form.prefecture NEQ 0> <CFIF form.city NEQ 0> ORDER BY tbl_job_post_location.PostCity </CFIF> <CFELSE> ORDER BY tblkp_prefectures.FullNameS, tbl_job_post_location.PostCity </CFIF> <CFELSE> ORDER BY tblkp_countries.CC1, tblkp_prefectures.FullNameS, tbl_job_post_location.PostCity </CFIF> <CFELSEIF session.SRT EQ "T"> ORDER BY tbl_job_posting.JobTitle </CFIF> </CFQUERY> Can anybody see a shortcut to get the same results??
Average Query Results Not Correct
This query works, but average results are not correct. I don't no what the problem is! Should i use subquery's? Joining is not working fot this type of query's?
Average Query With 2 Rows From Same Table
My table: "answer" answerID answer(int) questionID(int) userID(int) answer1 is questionID = 1 answer2 is questionID = 2 WHERE userID is the same for both answer1 and answer2 I want the average of answer1/answer2: AVG(ans1/ans2), but how?
Find Average Amt Of Days Dates
I've been working on this problem for quite some time now. I've searched google and all over these forums, but didn't quite find what I'm looking for. Here's what I'm doing: mysql> SELECT idno, sro, pname, adate, cdate , TO_DAYS(cdate)-To_DAYS(adate) as days FROM turnaround group by idno,sro order by adate; +------+----------+--------------+------------+------------+------+ | idno | sro | pname | adate | cdate | days | +------+----------+--------------+------------+------------+------+ | 4 | S1111115 | Tupperware | 2003-05-03 | 2003-05-05 | 2 | | 5 | S1111116 | Tupperware | 2003-06-03 | 2003-06-05 | 2 | | 3 | S1111114 | Blab | 2004-05-03 | 2004-05-05 | 2 | | 2 | S1111112 | Product Test | 2005-03-11 | 2005-03-11 | 0 | | 1 | S1111113 | Big Tester | 2005-04-06 | 2005-04-08 | 2 | | 6 | S1111111 | blah blah | 2005-11-18 | 2005-11-22 | 4 | +------+----------+--------------+------------+------------+------+ 6 rows in set (0.00 sec) What I need to do now is find the average number of days. I've tried several combos of AVG() without sucess. Could someone point me in the right direction?
MySQL Order By Average Of Two Fields
I have made a Toplist mod for vBulletin, and it currently has a setting to choose to rank the sites by their in hits, or their out hits. I would like to add another setting that can rank them by the average of the in and out hits for each of the sites in the Toplist. Does anyone know how I can have MySQL order them by the average of those two fields?
MySQL Round And Average Functions
I have a column in a mySQL database table that stores a rating from 1 to 5. I wish to select all rows from this table and get the average rating rounded to the nearest whole number. I imagine its something like this "SELECT ROUND(AVG(rating)) from ScoreTable"
Column That Calculates Average Based On Other Columns?
is it possible to have a column called "average" that adds up and then averages out the data in other columns? I've got a database with several columns of scores. I'd like to have a column that holds the average score. Then on my website, my visitors can sort by the highest score and I'll be able to pull the info straight from the db.. furthermore, only certain columns hold scores, they're named like "scoreA", "scoreB" and so on... is this at all possible? If not, can anyone point me to some php resources that will allow me to calculate hundreds, perhaps thousands of scores (on the fly) and present them from high to low (or low to high)?
Calculate A Moving Average And Updating A Table With It
I'm learning SQL and now I'm trying to update a table (koersen) with stockdata (date, ticker, open, close, volume, MA10vol). The column MA10vol is empty and should contain the avg volume from the last ten records with the same ticker. What I tried sofar: SELECT @hdat:= (SELECT DISTINCT DATE_FORMAT(datum, '%Y-%m-%d') FROM koersen ORDER BY datum DESC LIMIT 0,1); SELECT @ldat:= (SELECT DISTINCT DATE_FORMAT(datum, '%Y-%m-%d') FROM koersen ORDER BY datum DESC LIMIT 0,10); SELECT tickerVL, AVG(totvolume) AS MA10 FROM( SELECT SUM(k.volume) AS totvolume FROM koersen k WHERE k.datum BETWEEN @hdat AND @ldat GROUP BY k.tickerVL ) AS tijdelijk The update part comes later. I'm now trying to make a subquery to get me the total volume of the last ten days. But I get a message that the subquery returns more then 1 row (more tickers I think). But I want a query that updates every MA10vol for every ticker. I know I'm doiing something wrong but what?
Running Two SUM
SELECT SUM(nlamount WHERE nlaccount='3202' THEN 1 ELSE 0 END) AS receivables, SUM(nlamount WHERE nlaccount='3207' THEN 1 ELSE 0 END) AS receivablesvat FROM nominalledger WHERE nlcompanyid=$companyid AND nldate >= $company_end_year GROUP BY nlcompanyid I want to run this script, I basically want to add up nlamount twice, when nlaccount=3202 and nlaccount =3207 i have got te syntax wrong though in the SUM command, I have tried googling it, but there are only basic tutorials in sql outside the SUM instead of inside the SUM
Get Average Of A "count"
How to get average of a count(user); Following syntax run very well $records = mysql_query( "SELECT user,action,count(user) FROM log where date='$datetr2' and action='add' group by action,user") But now I also want avg(count(user)), but it didn't work $records = mysql_query( "SELECT user,action,count(user) ,avg(count(user)) FROM log where date='$datetr2' and action='add' group by action,user") count(user) only get hot many times a user log into the webside a day. Right now I want to know the average times of user logging into the web within month. I don't know to get average number. avg() function doesn't work here.
Help Please Running Mysql On Os X
I am very new to mysql. I am using the sitepoint book 'Build your own Database Driven Website using PHP and MYSQL. I have installed mysql mysql-5.0.41-osx10.3-powerpc. Under preferences/mysql it indicates that the mysql server is running. When I try to access mysql through the terminal window I get a message - command not found. Or no permissions. I can go to the bin directory and list the contents - they seem to be there. I can't get past page 21/22 Post-installation setup tasks. I am also new to using the terminal window. I suspect I have missed something really basic - any suggestions on how I can get up and running would be much appreciated!
Need Some Help In Getting MySQL Set Up And Running.
I wasn't sure if someone would be able and willing to help me, but I am new to installing MySQL on a Windows 2003 server (actually .. any server), but I am installing it on a Windows 2003 server right now. I also installed a new version of PHP on the same server. Everything looks fine, but when I go to phpinfo.php I don't see anything saying MySQL. (I saw somewhere that if MySQL is installed properly, it should be displayed on the phpinfo.php page.) I am currently trying to set up and run Cerberus Help Desk, but it isn't finding the MySQL database that I installed. So, I would really appreciate it if someone could not just help me via email or postings in here, but actually by using Instant Messenger (AOL, Yahoo! or MSN) to walk me through the set up, testing, etc. so I can get things up and running properly. I was hoping that someone with more experience than I might be willing to help me in this manner.
Is There A Way To Calculate Running SUM
I have a table (T1) consisting of 2 columns, Date and Observerd as follows: Date Observed 4/1/07 2 4/2/07 4 4/7/07 3 4/10/07 5 4/12/07 1 4/18/07 7 4/22/07 2 and we want to write a query to create a table or a view with the following data: Date ThreeDaySum 4/1/07 9 <-- (2+4+3) 4/2/07 12 <-- (4+3+5) 4/7/07 9 <-- (3+5+1) 4/10/07 13 <-- (5+1+7) 4/12/07 10 <-- (1+7+2)
Could Not Get MySQL Running
I went to MS-DOS to start the MySQL application by typing mysqld into the bin directory of where I installed MySQL but once I did typed the command and pressed enter this is all I got : A moment passed before I am shown the path of bin with no indication of MySQL server started. And also I have installed this as a window service.
#1064 - While Running A Doc Example
I plan to use the function ADDTIME(expr1, expr2) in an SQL request. I looked at the doc and tried the normal syntax, but I have always the following error even if I enter the example from the doc, why ? #1064 - You have an error in your SQL syntax. Even if I enter SELECT ADDTIME("1997-12-31 23:59:59.999999", "1 1:1:1.000002"); I am using MySQL under Windows 2000 using EasyPHP 1.7 (Apache 1.3.27, PHP 4.3.3, MySQL 4.0.15, PhpMyAdmin 2.5.3. )
Slow Running Sql
i am not using mysql but an unknown database system on a unix box - i have no control over the database but have purchased an odbc driver that seems very 'clunky' after using mysql - this is an sql statement question rather than a mysql tech question. if i run this: SELECT MK_01_vehicleRecords.registrationnumber, MK_01_VehicleRecords.vehiclenumber FROM MK_01_VehicleRecords WHERE (MK_01_VehicleRecords.vehiclenumber = '36176')
Running MySQL 5.0
I've just downloaded and installed 5.0 on my Pc/ win 98se. When I run the program MySQL Command Line Client, it appears to run for a second then disappears. I see the program flash open for a second and then it is gone.Complete newb needs some help.
Running Balance With Where
I am using the following query: SET @bal1=0,@bal2=0,@bal3=0,@bal4=0,@bal5=0,@bal6=0; SELECT Id, Date, FCode, Descr, Debit, @bal5 := @bal5 + DebT AS RunDeb, Credit, @bal6 := @bal6 + CreT AS RunCre, @bal2 := @bal2 + net AS RunBal, Rec FROM ( select fin_records.id, fin_records.id_production_unit as PUnit, fin_records.id_bank_account as BAcc, date_format(fin_records.fin_record_date,'%d-%m-%y') as Date, fin_accounts.fin_account_code as FCode, fin_records.fin_record_desc AS Descr, fin_records.fin_record_debit AS Debit, @bal3 := fin_records.fin_record_debit AS DebT, fin_records.fin_record_credit AS Credit, @bal4 := fin_records.fin_record_credit AS CreT, @bal1 := fin_records.fin_record_debit - fin_records.fin_record_credit AS Net, fin_records.fin_record_rec AS Rec from fin_records inner join fin_accounts on fin_accounts.id=fin_records.id_fin_account where (fin_records.id_production_unit='$up') and (fin_records.id_bank_account='$ba') and (fin_record_date between makedate(year(curdate()),1) and makedate(year(curdate()),365)) order by fin_records.fin_record_date,fin_records.id ) AS tmp; I should build another column to get RunBal2, that should include only records with Rec = 1.
Mysqld Is Not Running
cannot seem to run mysql commands, although queries seem to work well as I can make databases and view tables. Hope that makes sense. I installed mySQL 5 on Windows XP and tried to stick with the default installation options and paths. I lauch mySQL from this: ""C:Program FilesMySQLMySQL Server 5.0inmysqld", enter a password (but not a username so I'm assuming that's root user), get a mysql> prompt. So far so good. The following commands do not seem to work though: mysqladmin version mysqladmin variables Typing these commands then clicking the return key brings up the -> prompt. I've checked the processes and "mysql.exe" and "mysqld-nt.exe" are running. From a c: prompt I tried to install mysqld and was told it is already running. What am I missing here? I'm sure it is something very simple... Ultimately I need to bring in a table from a SQL dump from another system. I've tried using variations of: mysql -h host -u user -p dbname < dumpfile.sql I'm combing through the docs, but still don't have a clue.
MySQL 4.1 Running
I've been running mysql 4.1 for sometime and using phpMyAdmin (v2.6.2) to administer the databases. Using php scripts I can also update/insert etc the databases (maintained on my laptop Mac OS X Tiger). Suddenly, I can't get phpMyAdmin to load in the browser. I've also tried other MySQL GUI tools like CocoaMySQL and Navicat....they won't run either. I downloaded and installed phpMyAdmin 2.6.3-pl1 as well but no improvement. Why would mysql run but the admin apps not work?
Running MySQL From A CD-ROM?
I have used PHP and MySQL for a few years now. Just today I can across an application that had a MySQL database running locally off a CD ROM. I did not know this was posible. When the application runs it starts up the MySQL database without the user even knowing they are running it. It is pretty amazing. So I want to do the same thing. Is there any documentation on how to run MySQL locally. I would like to know how to build the database and create tables under these curcumstances.
Running 4.1 And 5.0 On Linux
Question: How can I run 4.1 and 5.0 simultaneously on linux - Suse 9.3 in particular? My goal is to do no harm to my current 4.1 setup. Can the 4.1 and 5.0 rpm's play nice together? Can I use the rcmysql commands for running multiple versions?
Running Sql Scripts
In the past I have always used phpmyadmin to access my mysql database. I am now doing something on a host that does not have php my admin. Can anyone help me either: 1. setup phpmyadmin -- I downloaded and uploaded to the server but I can't seem to get the config file correct or 2. how can I upload a sql script (creating all my tables) to the database.
Running Script
I'm jumping ship from a dead beat host - but first i'm trying the import on my own machine(osX). Exported all my data from phpMyAdmin 2.5.6. I did it in SQL format - one for the structure and one for the data - to a zip file(also tried with GZip).The file starts with comments and is being interpreted as all commnets - it seems there are no carriage returns - however when i look at it in any text editor or in mySql query browser, it's formatted correctly. I can place a carriage return after a comment line and reopen the query in the query browser and everything looks ok...until the next comment. My only thought is that it must be some kind of encoding issue - but i'm pretty lost when it comes to stuff like that.I've tried from the terminal/command line as well.
Running Balance
I have to calculate running balance in a query, I am trying this: set @fin_record_bal1=0; set @fin_record_bal2=0; select id,fin_record_debit,fin_record_credit,@fin_record_bal1:=fin_record_debit-fin_record_credit,@fin_record_bal2:=@fin_record_bal1+@fin_record_bal2 from fin_records The above doesn't work in record one
Running MySQL
I have installed mysql-3.23.54-win and it all seems to have gone OK .... now i want to run it and setup a database. I dont have an icon on the desktop and there is nothing in Start - Programs ..... start it from DOS prompt via C:> C:mysqlinmysql.exe and i get error 2003 cant connect to MySQL server on localhost <10061>
Running Queries
I am running phpbb forums, and I had run into a problem. They gave me a line of code that Im am supposed to run to fix my problem. Now that creates a problem, because that line of code is wrong sql says?? Heres the code.. ALTER TABLE phpbb2_users ADD COLUMN user_timezone float DEFAULT '0' NOT NULL I think the problem lies within the user_timezone part. I get an error 1064, and also it says that the database table phpbb2_users is not there, which I am looking at
Running A Query
I'm following a guide, and it says to do this stuff in my mysql database. However, whenever I try to run it (with slight alterations to the code to try to get it to work) it always gives me a syntax error. What do I have to type exactly? Hers the code: mysql> CREATE TABLE chat -> chtime DATATIME, -> nick CHAR (10) NOT NULL, -> words CHAR (150);
Running Two Servers
--=__Part1A441A35.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I am looking into installing 2 mysql servers on the same windows 2000 PC. From what I have found, it is usually possible to have 2 different versions on the same machine. (Usually one for testing and the other for production). However, I am trying to run 2 production servers, one for personal family info, and the other for business opportunity. Being that I just started using mysql, is it possible then to have the same version installed twice, or how do I accomplish my task?
Problem Running 4.1.1
I've tried several clean installs of 4.1.1, but each time I set a configuration, the configuration wizard tells me the server could not be started with an error code of "0". On a winxp machine using Apache 2.0.54 and PHP 4.3.11, what could be the problem?
Running 2 Msql Servers
I want to run two mysql server on the same win xp machine independent of each other: one on 3306 and one on 3309. How and what files do I have to modify to set the second server port to 3309 permanently.
|