Jump to content
php.lv forumi

Kā pareizi izvilkt ierakstus no DB?


rebuilder

Recommended Posts

Visu laiku esmu darījis apmēram šādi

 

$query = "select dats from tabulas where nemt='Ja'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$rezultats = $row['dats'];
echo  ''. $rezultats .';';}

 

Šādi izvada visu smuki - dats1;dats2;dats3.. utt.

 

 

Bet man tagad vajadzētu to visu, kas tiek izvadīt piešķirt vienam mainīgajam, piemēram, lai

$dati= "dats1;dats2;dats3.. utt."

 

 

Cik saprotu jādarbojas ar masīviem (???), bet kā precīzi to panākt es nezinu...

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