Jump to content
php.lv forumi

Teksta ievietoša mySQL


chirkainais

Recommended Posts

vispirms jāizveido datubāzi ar tabulu, kur likt tekstu..

tad lasam failu

izveidojam mysql konekcija

kameer nav sasniegtas faila beigas

taisam mysql kveriju un

ievietojam datubaze katru rindu ar unikalu id , butu vis labak.

Link to comment
Share on other sites

vispirms jāizveido datubāzi ar tabulu, kur likt tekstu..

tad lasam failu

izveidojam mysql konekcija

kameer nav sasniegtas faila beigas

taisam mysql kveriju un

ievietojam datubaze katru rindu ar unikalu id , butu vis labak.

 

 

Nav jau tik traki, ka neko nesaprot, vajadzīgs tieši tā kverija piemērs jo pārējais taka būtu saprotams. :D

Link to comment
Share on other sites

INSERT INTO teksti (teksts) VALUES($rindinjas mainigais no faila),($nakamais rindinjas mainigais no faila),($aiznakamais rindinjas mainigais no faila);

šādi tas viss notiksies daudz ātrāk: vienā insertā labāk ielikt kādas 1000x rindiņas nekā taisīt 1000x insert

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