Jump to content
php.lv forumi

Izvilkt tabulu no datubāzes


laucinieks

Recommended Posts

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.

Link to comment
Share on other sites

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 by laucinieks
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...