Tag Info

New answers tagged

0

select usr.nick_name, count(ans.ans_given) from user usr, question que, answer ans where usr.user_id = ans.user_id and que.question_id = ans.question_id and que.right_ans = ans.ans_given group by usr.user_id That was the solution, but how to show 0 if an user did not answer anything correctly?(thanks szakwani)


-1

select usr.nick_name, count(ans.ans_given) from user usr, question que, answer ans where usr.user_id = ans.user_id and que.question_id = ans.question_id and que.right_ans = ans.ans_given; it would help if you could create the DDL in sql fiddle and we could have a working environment. If you chose to vote down, kindly leave a comment.


0

It may be more efficient to simply use a cascading delete via a foreign key. When a row with the same product_code is deleted from products, it will be deleted in sales_detail as well. ALTER TABLE sales_details ADD FOREIGN KEY fk_product_code(product_code) REFERENCES products(product_code) ON DELETE CASCADE; But if you'd like to use a trigger to delete ...


0

Since you specifically asked about phpMyAdmin and the previous answers, while correct, are both about doing this on the command line: Navigate to the database you wish to export. Across the top row of tabs click "Export" Next, click the Custom radio button Halfway down the "Format-specific options" area, select "structure" (the default is "structure ...


0

mysqldump --no-data big_db_name > big_db_name.structure.sql


0

Dump table structure only wth the below codes mysqldump -d -h localhost -uYourUsername -pYourPassword databasename > dumpfile.sql


0

I came up with my own solution (but if you think this can be done better, please post your option): In the file /libraries/Menu.class.php I changed ... if (isset($cfgRelation['menuswork']) && $cfgRelation['menuswork']) { ... with $groupTable = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . "." . ...



Top 50 recent answers are included