laucinieks Posted January 10, 2011 Report Share Posted January 10, 2011 Sveiki, šeit ir kods - $db_selected = mysql_select_db('datubaze'); if (!$db_selected) { die ('Can\'t access database datubaze: ' . mysql_error()); } Zem datubazes "Datubaze" ir daudz tabulas, kā lai izvelk noteiktu tabulu lang_en, vai lang_ru? Jo man jauzrāda failā ir noteikta vieta uz tabulu. Iepriekš es darīju tā - Taisīju datubāzi datubaze_lv datubaze_ru un datubāze_en. Bet tagad ir tikai viena datubāze un daudz tabulas. Cerams sapratāt. Quote Link to comment Share on other sites More sharing options...
briedis Posted January 10, 2011 Report Share Posted January 10, 2011 *facepalm* Un kā tu iepriekš izvilki "tabulu"? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 10, 2011 Report Share Posted January 10, 2011 Ar mysql_query() + mysql_result() / mysql_fecth_array()? O.o Quote Link to comment Share on other sites More sharing options...
laucinieks Posted January 10, 2011 Author Report Share Posted January 10, 2011 (edited) Tad, tagad tāpat būs - datubaze_lang_lv, datubaze_lang_ru, datubaze_lang_en ? + pie reizes vēlos pajautāt, kā lai uzliek - require_once(.."/personigaispanelis.php"); Lai viņš ņem vienu mapi uz atpakaļu un lasa to failu. personigaispanelis.php atrodas mapē reg, bet failus vajag lasīt no galvenās mapes, kurā savukārt atrodas mape reg. Edited January 10, 2011 by laucinieks Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 10, 2011 Report Share Posted January 10, 2011 Lai "lektu pa direktorijām uz atpakaļ", izmanto ../../../ cik reizes vajag. Teiksim... require '../uploads/dagrevis.png'; Quote Link to comment Share on other sites More sharing options...
laucinieks Posted January 10, 2011 Author Report Share Posted January 10, 2011 Tagad ir šādi - require_once("../reg/personigaispanelis.php"); Un izmet - Warning: require_once(../../personigaispanelis.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\saite\reg\fails.php on line 4 Fatal error: require_once() [function.require]: Failed opening required '../../personigaispanelis.php' (include_path='.;C:\php5\pear') in C:\wamp\www\saite\reg\fails.php on line 4 ------ Uz apakšmapi māku pāriet - require_once(reg."/fails.php"); Bet atpakaļ vienu mapi nesanāk. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 10, 2011 Report Share Posted January 10, 2011 *facepalm* Quote Link to comment Share on other sites More sharing options...
rebuilder Posted January 10, 2011 Report Share Posted January 10, 2011 Taisīju datubāzi datubaze_lv datubaze_ru un datubāze_en. Šis jau vien pasaka, ka tālāk kaut ko darīt Tev tur nav jēga :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.