Jump to content
php.lv forumi

MYSQL izvilkšana


Ernijs_E

Recommended Posts

Saglabāju tabulā galvene visu svarīgo informāciju - mājas lapas nosaukums, aprakstu u.tml., bet kā es varu izvilkt tieši nepieciešamo!

 

Respektīvi, man ir tabula, kurā ir lauki - ga_id, ga_name, ga_value, man piemēram vajag izvilkt ga_value kurš atrodas tabulā galvene, kurai ga_name ir nosaukums.

 

Es pat nezinu kā to savādāk izskaidrot!

Link to comment
Share on other sites

visu laiku izvada - Resource id #4!

 

 

<?php $nosaukums = mysql_query("SELECT ga_value FROM galvena WHERE ga_name='web_nosaukums';"); ?>

un cenšos izvadīt

<?php echo $nosaukums ?>

 

viss ko dabūnu pretī ir Resource id #4!

Edited by Ernijs_E
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...