vbz Posted March 24, 2005 Report Share Posted March 24, 2005 Vai ir kaada universaala klase PHP? Vajag parametrus column field, row field, data field Ideja: f1;f2;f3 1;A;2 2;B;3 1;B;4 1;C;3 f1- objekts (reaalaas dziives entiitija) f2 - objekta parametrs f3 - objekta parametra veertiiba f1 - row field f2 - column field f3 - data field rezultaats: group by f1 f1;f2_A;f2_B;f2_C 1;2;4;3 2;NULL;3;NULL tur veel iespeejamas group by functions Varbuut ir kaadas idejas tieshi ar MySQL jebkuraa programeeshanas valodaa Nezinu tak var to implementeet??? Link to comment Share on other sites More sharing options...
bubu Posted March 24, 2005 Report Share Posted March 24, 2005 Uzraksti pats :) Tipa: function getObj($obj) { $obj = new Array(); $r = mysql_query("SELECT f2, f3 FROM tabula WHERE f1='$obj'"); while ($row = mysql_fetch_row($r)) { $obj[$row[0]] = $row[1]; } mysql_free_result($r); return $obj; } Link to comment Share on other sites More sharing options...
vbz Posted March 24, 2005 Author Report Share Posted March 24, 2005 Uzraksti pats :) Tipa: function getObj($obj) { $obj = new Array(); $r = mysql_query("SELECT f2, f3 FROM tabula WHERE f1='$obj'"); while ($row = mysql_fetch_row($r)) { $obj[$row[0]] = $row[1]; } mysql_free_result($r); return $obj; } 15518[/snapback] Es runaaju par cross-table alias crosstable, cross tabulation utt. Paskaties kautkur math statistica Vai ir php taada fiicha, ja nav - citur ir ,piem ADODB Vai tieshaam neviens nau saskaaries ar sho probleemu , Buus jaaraksta pasham Link to comment Share on other sites More sharing options...
bubu Posted March 24, 2005 Report Share Posted March 24, 2005 Tad laikam nesarpotu(-atu), ko tev vajag.. Un kā tu saki - php tas nav, bet adodb ir? A adodb nav priekš php veidots speciāli? Kā tad īsti ir - php ir vai nav tas, kas tev tur vajadzīgs? Link to comment Share on other sites More sharing options...
vbz Posted March 24, 2005 Author Report Share Posted March 24, 2005 ADODB arii pieejams uz php caur tikai uz WIN32 Es runaaju par cross-table. Tu Exceli nekad neesi lietojis - profesionaali???? - Pivot table Link to comment Share on other sites More sharing options...
Kavacky Posted March 24, 2005 Report Share Posted March 24, 2005 ADODB arii pieejams uz php caur tikai uz WIN32Kas par teikuma konstrukciju! Link to comment Share on other sites More sharing options...
bubu Posted March 24, 2005 Report Share Posted March 24, 2005 Par kādu adodb tu runā? Vai šo: http://adodb.sourceforge.net/ ? Excelī man PivotTable nav nācies izmantot. Link to comment Share on other sites More sharing options...
vbz Posted March 24, 2005 Author Report Share Posted March 24, 2005 Par kādu adodb tu runā? Vai šo: http://adodb.sourceforge.net/ ?Excelī man PivotTable nav nācies izmantot. 15541[/snapback] Buus jau labi , es sajaucu. ADODB es domaaju MS ADO(Active Document object), kur principaa straadaa ar recordset, un ja nemaldos var ar to pieprasiiijumu prasiit cross-table. Esmu straadaajis ar FoxPro, kur ir _gentab (vfpxtab) un mekleeju vienkaarshi universaalu algoritmu. Probleema taada, ka MySQL nav kur normaali saglabaat rezultaatu. Array neder. Taa jau buus sarezhgjiits query, veel peec tam apstraadaat to masiivu liekas marasms Var CREATE TEMPORARY TABLE - kaads ir to lietojis WWW projektos? Un veel vai var transakcijas normaali darbinaat ar PHP API? Link to comment Share on other sites More sharing options...
Recommended Posts