Jump to content
php.lv forumi

select no flatfile


zimulis

Recommended Posts

ir textdb file

 

1vertiba$2vertiba$3vertiba$4vertiba$5vertiba

12vertiba$22vertiba$32vertiba$42vertiba$52vertiba

13vertiba$23vertiba$33vertiba$43vertiba$53vertiba

 

ir skripts ar ko es vinu lasu

 

$fp = fopen('orders.php','r');

if (!$fp) {echo 'ERROR: Unable to open file.</table></body></html>'; exit;}

 

while (!feof($fp)) {

$line = fgets($fp, 1024); //use 2048 if very long lines

list ($field1, $field2, $field3, $field4, $field5, $field6) = split ('/$', $line);

echo '

<tr>

<td>'.$field1.'</td>

<td>'.$field2.'</td>

<td>'.$field3.'</td>

<td>'.$field4.'</td>

<td>'.$field5.'</td>

<td>'.$field6.'</td>

</tr>';

$fp++;

}

 

fclose($fp);

 

pirmais ieraksts ir unikalais ID. Ka var selektēt vienu db rindu tikai pēc ID nu cipa ka MYSQ

SELECT From tabula WHERE id=$_get[id]

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...