Re_Boot Posted October 24, 2007 Report Share Posted October 24, 2007 Nu tā, sāksim ar to ka es isti nez vai es post pareizaja vieta, jo nesen piereģistrējos, un atvainojos jau iepriekš! Tā man ir skripts ar kuru var upload biles iekšā datubāze, un tas strāda ideāli. Man ir vajadzigs tikai skripts kas nolasa bildi no datubazes... Ludzu palīdziet! Būtu labi ja skripts arī atsķirtu kuram useram pieder šī bilde... Ar to es domāju UserID... Link to comment Share on other sites More sharing options...
andrisp Posted October 24, 2007 Report Share Posted October 24, 2007 SELECT image FROM users WHERE UserID = 123 ? Bet ja nopietni - tad uzdod konkrētākus jautājumus - gatavu skriptu tev neviens neiedos. Link to comment Share on other sites More sharing options...
Re_Boot Posted October 24, 2007 Author Report Share Posted October 24, 2007 SELECT image FROM users WHERE UserID = 123 ? Bet ja nopietni - tad uzdod konkrētākus jautājumus - gatavu skriptu tev neviens neiedos. Paldies par to pašu! :) Link to comment Share on other sites More sharing options...
Re_Boot Posted October 24, 2007 Author Report Share Posted October 24, 2007 hmm, atvainojos par stulbumu, bet kā šo skriptu lietot!? SELECT content FROM upload WHERE UserID = 123 Es šādi ieliku skriptu vietā kur man vajag lai parādas bilde... Link to comment Share on other sites More sharing options...
p4F Posted October 24, 2007 Report Share Posted October 24, 2007 (edited) mby izdari tā mysql_query("SELECT content FROM upload WHERE UserID = 123"); ātri uzrakstīju kodu rakstīju ātri... tapēc nepārbaudīju <?php if($_GET['content'] and $_GET['userid']) { $result = mysql_query("SELECT content, images FROM upload WHERE UserID = {$_GET['userid']}"); $row = mysql_fetch_row($result); echo "<img src='bildes/$row[1].gif'>"; } else { echo "Kautkas nepareizs"; } ?> Edited October 24, 2007 by p4F Link to comment Share on other sites More sharing options...
Delfins Posted October 24, 2007 Report Share Posted October 24, 2007 Tu man pasaki, nafig topikam likt ":P" ikonu... Samaksā labāk kādam, vai aliņu, lai uztaisa, a to kārtējais topiks - iekopēju kodu un nekas neiet. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted October 24, 2007 Report Share Posted October 24, 2007 Delfins --> srunts par ikonu taa mazaakaa beeda paskaties labaak kaads ir topika nosaukums... // [php,MYSQL] Image View, PLEASE Apsties šeit! Un ātri! // ne linka nekaa + PAVELES formaa !!! Link to comment Share on other sites More sharing options...
Delfins Posted October 24, 2007 Report Share Posted October 24, 2007 (edited) tieši ikonas un poke-teksts atbaida tādiem palīdzēt... xD LOL :P Un it īpaši dēļ tā, ka grib uztaisīt neko nedarot un nejēdzot... Edited October 24, 2007 by Delfins Link to comment Share on other sites More sharing options...
Re_Boot Posted October 24, 2007 Author Report Share Posted October 24, 2007 Nu nav jau taa ka esu galīgs dalbajobs... Kautko sajedzu arī :) Link to comment Share on other sites More sharing options...
martins256 Posted October 24, 2007 Report Share Posted October 24, 2007 1. tev datubāzē ir saglabāts ceļs uz failu vai bildes pats saturs? ja ir ceļš, tad +- der p4F variants, ja otrs, tad :D Link to comment Share on other sites More sharing options...
Re_Boot Posted October 25, 2007 Author Report Share Posted October 25, 2007 umm, diemzhel man p4F Skripts neiet! :( Link to comment Share on other sites More sharing options...
Grey_Wolf Posted October 25, 2007 Report Share Posted October 25, 2007 neviens no pirksta te neiziiles kas tev glabajas DB .... Link to comment Share on other sites More sharing options...
Re_Boot Posted October 25, 2007 Author Report Share Posted October 25, 2007 Manas tabulas struktura: Table Create Table ------ -------------------------------------------------------------------------- upload CREATE TABLE `upload` ( `id_user` int(11) unsigned zerofill NOT NULL auto_increment, `name` varchar(30) NOT NULL, `type` varchar(30) NOT NULL, `size` int(11) NOT NULL, `content` blob NOT NULL, PRIMARY KEY (`id_user`) ) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC Kad es upload bildi, tad taa saglabajas "content", un man vajag lai to bildi nolasa, lidzigi ka draugiem.lv, katram useram sava bilde! Ceru ka saprati manu domu... Link to comment Share on other sites More sharing options...
Grey_Wolf Posted October 25, 2007 Report Share Posted October 25, 2007 Kad es upload bildi, tad taa saglabajas "content", Kas tur saglabajas celjs uz bildi vai Fiziski pati bilde (binary)? Ja fiziski pati bilde tad taada pieeja nav laba .... Link to comment Share on other sites More sharing options...
Re_Boot Posted October 25, 2007 Author Report Share Posted October 25, 2007 Itka, binary! Pati bilde.. Maybe vari kautko ieteikt? Link to comment Share on other sites More sharing options...
Recommended Posts