| alexstacey | wrong channel mate =] anyway, i'm off to bed |
| zack | Can I order by 2 thigns? Can I order by 2 criteria, with one more important than the other? |
| alexstacey | laterz |
| zack | like if i'm doing an order by rating desc, and two people have rating of 10 how do I make sure that the person with a greater number of ratings is ranked higher? |
| kimseong | order by a second condition oder by expr1, expr2 |
| cmanns | Ello my sysadmin installed mysql...the /var partition is small I told him to switch the data dir to /usr so today mysql cannot write so I did mv /var/db/mysql to /home/mysql, chown -R mysql:mysql /home/mysql and tryed to start it but its not working right. Saying mysql.plugins table is missing or something Any suggestions |
| kimseong | change datadir to /usr but move to /home/mysql ? |
| cmanns | I have it set like datadir = /home/mysql basedir = /home/mysql It looks like the db's are in /home/mysql/mysql should I make the data dir /mysql/mysq ? |
| chemisus | yo |
| cmanns | ? |
| kimseong | basedir is the installation dir datadir shoule be /home/mysql the next level mysql is the database name for mysql database |
| cmanns | umm The db's are in /home/mysql/mysql though When it was in /var/db/mysql they're in /mysql too |
| kimseong | cmanns: do you have another mysql /home/mysql/mysql/mysql ? |
| cmanns | yes |
| kimseong | then /home/mysql/mysql is your datadir |
| hybridiZ1d | hi guys.. when i try start mysql it goes ......ERROR where can i go to see the mysql logs? and see why its failing and it wont start |
| kimseong | hybridiZ1d: error log, a file with extension err unless changed by the disrtibution |
| cmanns | cmanns-sl-db1# Starting mysqld daemon with databases from /home/mysql/mysql STOPPING server from pid file /home/mysql/mysql/cmanns-sl-db1.sup2u.com.pid =/ THis time no error |
| hybridiZ1d | kimseong: where is the error log usually? /var/log ? kimseong: hellow? |
| cmanns | Thx kimseong, I got it working now and thank god only mysql database got corrupted. |
| zack | $rank_query = "SET @result_num:=0; CREATE TEMPORARY TABLE table_name SELECT (@result_num:=@result_num+1) as rank,avg( actual_rating ), being_rated, count(*) FROM ratings GROUP BY being_rated HAVING count(*)>=2 ORDER BY avg(actual_rating) desc; select * from table_name where being_rated=$uid;"; $result3 = mysql_query($rank_query); $temparray = mysql_fetch_row($result3); Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in Help? |