O Bambus Brothersih

Vse o članih motoristične skupine Bambus Brothers
 
HomeHome  PortalPortal  CalendarCalendar  FAQFAQ  MemberlistMemberlist  UsergroupsUsergroups  SearchSearch  RegisterRegister  Log in  

Share | 
 

 MySQL - in PHP

Go down 
AuthorMessage
xxxxxy
Moderator
Moderator
avatar

Number of posts : 180
Registration date : 2006-12-01

PostSubject: MySQL - in PHP   Wed Dec 06, 2006 5:15 pm

<?php
mysql_connect(servername,username,password); <---- se najprej povežeš
mysql_select_db("my_db"); <---- izbereš bazo
$result =mysql_query("SELECT * FROM person"); <--- nato izbereš podatke, ta primer zbere celo tabelo
$result =mysql_query("SELECT priimke FROM person"); <---- ta primer izbere smo priimke iz tabele persons
$result = mysql_query("SELECT * FROM person WHERE priimek='novak'"); <--- ta primer izbere vrsstico v tabeli persons kjer je priimek novak

potem lahko rzultat prikažeš kar v tabeli:

Primer:

$result = mysql_query("SELECT Number, hiperlink, datum FROM hack-protect");

print ("<table width="576\" border='1'>
<tr>
<th>številka</th>
<th>novica</th>
<th>datum</th>
</tr>");
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Number'] . "</td>";
echo "<td>" . $row['hiperlink'] ."</td>";
echo "<td>" . $row['datum'] ."</td>";
echo "</tr>";
}
echo "</table>";


Lahko pa izbereš eno vrstico:

$result = mysql_query("SELECT * FROM person WHERE priimek='novak'");

in vskameu podatku določiš spremenlivko

while($row = mysql_fetch_array($result))
{
$ime=$row['name'];
$priimek=$row['priimek'];
$rojdatum=$row['rojdatum'];
$naslov=$row['naslov'];
}

sedaj pa poljubno, kjer hočeš uporabiš funkcijo echo ali pa print

npr:

<php>
Back to top Go down
View user profile
bejbika
Moderatorka
Moderatorka


Number of posts : 450
Age : 26
Registration date : 2006-11-28

PostSubject: Re: MySQL - in PHP   Mon Dec 11, 2006 4:31 pm

ajoj...kdu se pa zastopi v to Smile
Back to top Go down
View user profile
Administrator
Administrator
Administrator
avatar

Number of posts : 355
Age : 25
Registration date : 2006-11-09

PostSubject: Re: MySQL - in PHP   Mon Dec 11, 2006 6:25 pm

Profiči. 5xy in goba se zastopita, jst se pa ne kj preveč.
Back to top Go down
View user profile http://bambusbrothers.heavenforum.com
bejbika
Moderatorka
Moderatorka


Number of posts : 450
Age : 26
Registration date : 2006-11-28

PostSubject: Re: MySQL - in PHP   Tue Dec 12, 2006 4:50 pm

Admin wrote:
Profiči. 5xy in goba se zastopita, jst se pa ne kj preveč.
kam pa ti sebe uvrščaš???
pa ne žali drugih k jim bom kaj povedla da te bodo j.....v glavo!!!! Very Happy Very Happy Very Happy
Back to top Go down
View user profile
xxxxxy
Moderator
Moderator
avatar

Number of posts : 180
Registration date : 2006-12-01

PostSubject: Re: MySQL - in PHP   Tue Jan 30, 2007 9:04 pm

Koga sem pa žalil???

_________________
My name is Bond. James Bond!!!
Back to top Go down
View user profile
bejbika
Moderatorka
Moderatorka


Number of posts : 450
Age : 26
Registration date : 2006-11-28

PostSubject: Re: MySQL - in PHP   Tue Feb 13, 2007 3:12 pm

xxxxxy wrote:
Koga sem pa žalil???

ah...nč...pozabi!!!!!! Very Happy peace...brother
Back to top Go down
View user profile
xxxxxy
Moderator
Moderator
avatar

Number of posts : 180
Registration date : 2006-12-01

PostSubject: Re: MySQL - in PHP   Sat Apr 14, 2007 8:06 pm

sj sm že pozabu. Very Happy

_________________
My name is Bond. James Bond!!!
Back to top Go down
View user profile
bejbika
Moderatorka
Moderatorka


Number of posts : 450
Age : 26
Registration date : 2006-11-28

PostSubject: Re: MySQL - in PHP   Tue May 15, 2007 2:13 pm

xxxxxy wrote:
sj sm že pozabu. Very Happy

no lepo!! Very Happy Very Happy
Back to top Go down
View user profile
xxxxxy
Moderator
Moderator
avatar

Number of posts : 180
Registration date : 2006-12-01

PostSubject: Re: MySQL - in PHP   Thu May 17, 2007 12:59 pm

če sm vas žalu, ondi ni blo lepo.

Lp TAdej

_________________
My name is Bond. James Bond!!!
Back to top Go down
View user profile
bejbika
Moderatorka
Moderatorka


Number of posts : 450
Age : 26
Registration date : 2006-11-28

PostSubject: Re: MySQL - in PHP   Sun May 20, 2007 3:57 pm

ej...5xy...takrat še nismo vedli da ste ti pa admin eno in isto!!!!!

tista sporočila so stara že 100 let!!!

tk da ni blema!!!! Very Happy
Back to top Go down
View user profile
xxxxxy
Moderator
Moderator
avatar

Number of posts : 180
Registration date : 2006-12-01

PostSubject: Re: MySQL - in PHP   Thu Jun 07, 2007 8:51 am

Ja jst sm pa jst

_________________
My name is Bond. James Bond!!!
Back to top Go down
View user profile
bejbika
Moderatorka
Moderatorka


Number of posts : 450
Age : 26
Registration date : 2006-11-28

PostSubject: Re: MySQL - in PHP   Thu Jun 07, 2007 12:29 pm

xxxxxy wrote:
Ja jst sm pa jst

to vsako budalo ve!!! Very Happy Very Happy Very Happy
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: MySQL - in PHP   

Back to top Go down
 
MySQL - in PHP
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
O Bambus Brothersih :: Računalništvo :: Hekanje-
Jump to: