torrentz Posted September 2, 2007 Report Share Posted September 2, 2007 paste.php.lv lūdzu! kaapeec peedeejais update big, nepieskaita par 1 vieniibu vairaak? ar php un mysql esmu galiigs iesaaceejs (saliku skriptu no citos skriptos atrastajaam funkcijaam). Ar datubaazes tabulaam es domaaju probleemu nav, taapeec neesmu te ielicis, bet uz sho skriptu paskatoties gan jau ir skaidra tabulu uzbuuve. Link to comment Share on other sites More sharing options...
Val Posted September 2, 2007 Report Share Posted September 2, 2007 http://www.tvnet.lv/men/images/upload/bun_0.jpg Link to comment Share on other sites More sharing options...
torrentz Posted September 2, 2007 Author Report Share Posted September 2, 2007 (edited) lūdzu, ieliku Jūsu pielūgtajā paste.php.lv :) http://paste.php.lv/6002 ceru, ka palīdzēsiet Edited September 2, 2007 by torrentz Link to comment Share on other sites More sharing options...
bubu Posted September 2, 2007 Report Share Posted September 2, 2007 Drausmīgs skripts. Grūti kautko tur saprast. Pamēģini izskaidrot cilvēcīgiem vārdiem, ko tam jādara. Un vēl noteikti noņem nost visus @ simbolus, kā arī ieslēdz savā php konfigurācijā display_errors = on un error_reporting = E_ALL, citādi nebūs runāšana: ini_set('display_errors', 1); error_reporting(E_ALL); Tas tāpēc, ka tev tur ir tādas kļūdas, kuras šīs divas rindiņas parādīs uzreiz. Piemēram, 16 rindā. Link to comment Share on other sites More sharing options...
torrentz Posted September 3, 2007 Author Report Share Posted September 3, 2007 kad palaizhu skriptu test.php?id=1 paraadaas: Notice: Undefined variable: result in E:\xampp\htdocs\test.php on line 18 doma taada: ir mobiiloo telefonu datubaaze (mobiiilaa telefona user agent(primary key) un taa ekraana izshkjirtspeeja, kraasu dziljums, kamera kvalitaate utt.) skripts ar user agent paliidziibu meklee taadu telefonu datubaazee, ja neatrod, tad telefons automaatiski pievienojas ar defaut value. ja telefons tiek atrasts, tad skripts panjem taas veertiibas (ekraana lielums utt.) un pieskaita tabulaa big + 1 katrai veertiibai. tabulas big struktuura: CREATE TABLE `big` ( `id` INT(16), `13x13` INT(16) default '0', utt... `5.0` INT(16) default '0', # 3.1 Mpixs 2048x1536 utt... `nocamera` INT(16) default '0', utt `mono` INT(16) default '0', utt `cookieson` INT(16) default '0', `cookiesoff` INT(16) default '0', `gzipon` INT(16) default '0', `gzipoff` INT(16) default '0', `csd` INT(16) default '0', `hcsd` INT(16) default '0', utt... `irda` INT(16) default '0', utt PRIMARY KEY ( `id` ) ) TYPE=MyISAM COMMENT='big statistics'; Link to comment Share on other sites More sharing options...
andrisp Posted September 3, 2007 Report Share Posted September 3, 2007 torrentz, un kā tu domā kāpēc ir tas Undefined variable ? Link to comment Share on other sites More sharing options...
torrentz Posted September 3, 2007 Author Report Share Posted September 3, 2007 (edited) Es ļoti atvainojos, bet es neesmu maaciijies manuaaljus un tikai nesen saaku apguut PHP. Esmu nopircis 1 labu php skriptu, bet gribaas to pilnveidot un izveidot unikaalu WAP saitu reitingu, kur peec iespeejas vairaak buutu izmantoti grafiki un buutu ljoti siiki aprakstiita statistika kaada nav nevienaa citaa WAP saitu reitingaa. mekleejot guuglee: php errors undefined variable, es atradu, ka jaaizmanto ir: getenv('QUERY_STRING') $_SERVER['QUERY_STRING'] $HTTP_SERVER_VARS['QUERY_STRING'] un tam ir kaada saistiiba ar register globals on/off. Bet visi skripti, kas ir uz servera ir bezmaksas un puse nestraadaa uz register globals OFF (tie kas izmanto register globals on laikam ir nedroshaaki). Edited September 3, 2007 by torrentz Link to comment Share on other sites More sharing options...
andrisp Posted September 3, 2007 Report Share Posted September 3, 2007 Būs grūti. Tas kļūdas paziņojums nozīmē, ka mainīgais, ko tu centies izmantot, neeksistē. Paskaties pats: 16. rindiņā ir $result, bet 6. $rezult. Link to comment Share on other sites More sharing options...
torrentz Posted September 3, 2007 Author Report Share Posted September 3, 2007 (edited) paldies, andrisp. tagd man neraada nevienu kljuudu, bet veel joprojaam man neko nepieskaita pie ID=1 big tabulā (visur ir nulles) Edited September 3, 2007 by torrentz Link to comment Share on other sites More sharing options...
torrentz Posted September 3, 2007 Author Report Share Posted September 3, 2007 (edited) tabulas mobiles struktuura: CREATE TABLE `mobiles` ( `mobile` varchar(160) collate utf8_unicode_ci NOT NULL default '0', `screen` enum('352x416','noscreen') collate utf8_unicode_ci NOT NULL default 'noscreen', `camera` enum('0.1','nocamera') collate utf8_unicode_ci NOT NULL default 'nocamera', `color` enum('mono','nocolor') collate utf8_unicode_ci NOT NULL default 'nocolor', `cookies` enum('cookiesyes','cookiesno') collate utf8_unicode_ci NOT NULL default 'cookiesyes', `gzip` enum('gzipyes','gzipno') collate utf8_unicode_ci NOT NULL default 'gzipyes', `internet` enum('csd',''cdma') collate utf8_unicode_ci NOT NULL default 'gprs', `connect` enum('irda',no') collate utf8_unicode_ci NOT NULL default 'bluetooth', PRIMARY KEY (`mobile`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='mobile'; tabulas big struktuura: CREATE TABLE `big` ( `id` int(16) NOT NULL default '0', `352x416` int(16) default '0', `96x65` int(16) default '0', `noscreen` int(16) default '0', `5.0` int(16) default '0', `nocamera` int(16) default '0', `mono` int(16) default '0', `nocolor` int(16) default '0', `cookieson` int(16) default '0', `cookiesoff` int(16) default '0', `gzipon` int(16) default '0', `gzipoff` int(16) default '0', `csd` int(16) default '0', `cdma` int(16) default '0', `irda` int(16) default '0', `no` int(16) default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='big statistics'; bišķiņ rediģētais test.php: http://paste.php.lv/6004 http://paste.php.lv/6006 echo"$browser"; izvada nevis Mozilla, bet Array, kāpēc tā? Edited September 3, 2007 by torrentz Link to comment Share on other sites More sharing options...
bubu Posted September 3, 2007 Report Share Posted September 3, 2007 Tāpēc, ka $browser ir masīvs (array angliski) - http://lv.php.net/manual/en/language.types.array.php Link to comment Share on other sites More sharing options...
torrentz Posted September 3, 2007 Author Report Share Posted September 3, 2007 (edited) tas ir siikums :) kaads var paliidzeet tikt galaa ar skriptu? nav jau tas tik liels! biški paeksperimentēju: http://paste.php.lv/6008 bet paradās šāda kļūda: Notice: Undefined index: .$screen. in E:\xampp\htdocs\test.php on line 45 Notice: Undefined index: .$camera. in E:\xampp\htdocs\test.php on line 46 Notice: Undefined index: .$color. in E:\xampp\htdocs\test.php on line 47 Notice: Undefined index: .$cookies. in E:\xampp\htdocs\test.php on line 48 Notice: Undefined index: .$gzip. in E:\xampp\htdocs\test.php on line 49 Notice: Undefined index: .$internet. in E:\xampp\htdocs\test.php on line 50 Notice: Undefined index: .$connect. in E:\xampp\htdocs\test.php on line 51 Edited September 3, 2007 by torrentz Link to comment Share on other sites More sharing options...
cilveks Posted September 3, 2007 Report Share Posted September 3, 2007 (edited) edit: pārpratu Edited September 3, 2007 by cilveks Link to comment Share on other sites More sharing options...
bubu Posted September 3, 2007 Report Share Posted September 3, 2007 wtf? kas par sīkumu? Tu prasīji: echo"$browser"; izvada nevis Mozilla, bet Array, kāpēc tā? Es atbildēju. Ja jau tas ir kaut kāds sīkums, tad kāpēc prasīji, ja negribi saprast, "kāpēc tā"? Link to comment Share on other sites More sharing options...
torrentz Posted September 3, 2007 Author Report Share Posted September 3, 2007 (edited) jā, tev ir taisnība, es nesapratu. bet tur jau tā lieta, ka skripts nav liels un esmu gandrīz pabeidzis! un tas buus tikai pielikums pie jau gatava skripta (straadaajosha). Veelaak grafikus vareeshu bez lielaam probleemaam pats izveidot (jo pastaav gatavi grafiku skripti, kuri ir viegli sakonfigureejami) un tas echo"$browser"; man nav vajadziigs, es tikai taapat ieliku to tur , lai paarbaudiitu kaapeec man mysql datubaazee pievienojas jauns user agent (Array), kad es eju ar mozilla nevis jau piemineetaa mozilla. ceru ka kāds man palīdzēs savest sho skriptu vairāk vai mazāk kārtībā... es izlasiiju php.net par array, bet tā arī netiku skaidrībā. Varbūt es kļūdos, bet ar mobīlajiem pārlūkiem ir biški citadāk nekā ar klasiskajiem ie, mozilla es arii meeginaaju: $in=getenv("HTTP_USER_AGENT"); un peec tam izdzeest visu kas aiz "/" un tad paraadaas array bet tad kad neizmantoju explode, tad paraadaas pilnais user agent normaali Edited September 4, 2007 by torrentz Link to comment Share on other sites More sharing options...
Recommended Posts