Gacha Posted January 14, 2004 Author Report Share Posted January 14, 2004 Problēma ir tā, ka es mēģinu uzstādīt Mysql uz sava kompa. To itkā esmu uzstādijis, bet nevaru neko ievietot DB. Šajās bildēs ir viss tieši tā, kā ir uz mana kompa, bet tas protams neiet. Es vienkārši nezinu kur ko nepareizi esmu saslēdzis, jo pirmo reizi ņemos ar to mysql. :( Link to comment Share on other sites More sharing options...
persix Posted January 25, 2004 Report Share Posted January 25, 2004 CAu! Gluzi neizpratu tavu probleminu, bet varu meiginat palidzet! Ja nu peksni man sanak. :)) Jo ari es no sakuma nemos ar tam visam padarisanam ta ne pajokam. Link to comment Share on other sites More sharing options...
persix Posted January 25, 2004 Report Share Posted January 25, 2004 postots skripts. Te es iesviedu kadu tabulinu un kadu MySQL datubazes izveidi! Izveido to un palaid skriptu ar to postu. Es ta iedomajos varbut tev ir kada kludina ar tiem nosaukumiem, tas ir tur kur tu izveido insertu nosaukumi nesakrit ar tabulas ailites nosaukumiem! Link to comment Share on other sites More sharing options...
Gacha Posted January 25, 2004 Author Report Share Posted January 25, 2004 Nu paldies, ka vismaz viens kaut ko megina palidzet! Nu es uztaisiju failu db.php un tur ieliku iekshaa visu to scriptu, iznjemot to pashu apakshu. Kur man jaliek tas gabals, kursh izveido to tabulu? Un es izmantoju, vismaz meginu izmantot mysql control centre nevis php admin. Link to comment Share on other sites More sharing options...
jb4 Posted January 25, 2004 Report Share Posted January 25, 2004 Gacha, Tavās bildēs viss ir okei. MySQL Control Center parāda, ka ir tabula (posts), tātad ir. Lūk skripts, ar kura palīdzību pievienoties: <?php error_reporting(E_ALL); $conn = mysql_connect('localhost','gacha'); // ja ir parole tad jāraksta $conn = mysql_connect('localhost','gacha','parole'); if ( !$conn ) { die('Nesanaca pievienoties, jo nepareizs lietotajvards vai parole'); } if ( !mysql_select_db('datubazes_nosaukums') ) { die('Tada datubaze neeksiste'); } $res = mysql_query("SELECT COUNT(*) FROM tabulas_nosaukums"); if ( $temp = mysql_fetch_row($res) ) { echo 'Tavā tabulā ir '.$temp[0].' ierakstu!'; } else { echo 'Kļūd pieprasījumā'; } ?> Izpildi šo un tad palasi šos manus simt gadus vecus stāstus: http://www.cs.lpu.lv/php/index.php?id=mysql2 http://www.cs.lpu.lv/php/index.php?id=mysql3 http://www.cs.lpu.lv/php/index.php?id=mysql4 Link to comment Share on other sites More sharing options...
morpH Posted January 25, 2004 Report Share Posted January 25, 2004 mysql_query("INSERT INTO posts (post_id,post_title,post_text) VALUES (','$virsraksts','$teksts')"); IMHO, būtu labāk ('','$virsraksts','$teksts')"); Un vēl pie lauciņa post_id būtu labi pielikt tādu KEY kā AUTO_INCREMENT (sasniedzams MySQL Control Center'ā). Link to comment Share on other sites More sharing options...
persix Posted January 26, 2004 Report Share Posted January 26, 2004 izveido tabulu Ta ir adresite, kur ir tas kods, kas izveido tabulu un datubāzi! :) Link to comment Share on other sites More sharing options...
Gacha Posted January 26, 2004 Author Report Share Posted January 26, 2004 :D :D :D :D :D Es esmu staraa!!! Beidzot sanaaca, tagad tik jaizpeeta tas kods, lai saprotu, kaa tur viss straadaa. Ja man shis sanaaks tad to padariishanu ar flat failiem metiishu pie malas. Nu liels respekts jums :D Link to comment Share on other sites More sharing options...
Gacha Posted January 26, 2004 Author Report Share Posted January 26, 2004 Es palasiju tos rakstinjus, kurus jb4 bija rakstiijis un tagad paar maniim naaca apgaismiiba, ka ar MySQL tas ir daudz vienkarshaak nekaa ar flatfailiem. Tagad idejas man ir kaudzeem, bet protams ir viena problema tas STULBAIS no.lv admins (sorry, ka taa) man jau kaadas 10 dienas nevar atsuutiit ftp paroli, kuru netishaam pazaudeeju. Un vel visu prieksh MySQL. Man ir veel viena iespeeja uz viena servera, bet tur pagaidaam nav MySQL, bet tad man vajag dabuut latvijaa bezmaksas DNS (tikai ne valsts.lv). Link to comment Share on other sites More sharing options...
Gacha Posted January 26, 2004 Author Report Share Posted January 26, 2004 O! no.lv admins man tomer pieledza MySQL db! Tas ir forshi! tad nu tik uz priekshu :D Link to comment Share on other sites More sharing options...
persix Posted January 27, 2004 Report Share Posted January 27, 2004 MAn prieks! :D Nu tad lai tev veicas tavos lielos darbos! :D Link to comment Share on other sites More sharing options...
Recommended Posts