Search found 3 matches

by davemh
Thu May 11, 2006 3:08 pm
Forum: Databases
Topic: Combing Rows
Replies: 5
Views: 1045

But I'm afraid that can we sum the two colum and group it up according to the name ? Confused :? Any solution ? Dibyendra You are absolutely correct, summing the columns would be a better solution. Following your advice I executed the query from the command line and see where the tables are being a...
by davemh
Wed May 10, 2006 8:48 pm
Forum: Databases
Topic: Combing Rows
Replies: 5
Views: 1045

Ok, perhaps I am just missing something here $connect = mysql_connect($host, $user, $pswd) or die("Could not connect: " . mysql_error()); $database = mysql_select_db("$dbname") or die(MySQL_Error()); $sql = "SELECT DISTINCT name, GROUP_CONCAT( stat1, stat2) FROM DAVE GROUP B...
by davemh
Wed May 10, 2006 8:25 pm
Forum: Databases
Topic: Combing Rows
Replies: 5
Views: 1045

Combing Rows

I have searched through several pages and have not found a solution to my problem: For simplicity's sake, I have a table with 4 fields: id name stat1 stat2 -- -------- ------- ------- 1 Dave 23 0 2 Larry 12 0 3 Dave 0 4 4 Larry 0 18 What I want is if the name id duplicated, combine the rows, so: id ...