Website Development Prices

Pretrazite Blog // Search This Blog

Friday, October 23, 2015

Logicki operatori (Logical operators)

Ako zelite da budete sigurni da je temperatura veca od 65 i manja od 70, mozete upotrebiti ugnjezden iskaz if.

<?php

$temperatura = 66;
if ($temperatura > 65) {
if ($temperatura < 70) {
echo "Temperatura je prijatna.";
}
}


?>

Rezultat: Temperatura je prijatna.

Postoji i jednostavniji nacin. Mozete da koristite logicki operator && (And) i da njime povezete uslove $temperatura > 65 and $temperatura < 70. U ovom slucaju oba uslova moraju biti tacna da bi se izvrsio iskaz if

Wednesday, October 21, 2015

Upotreba podupita umesto privremene tabele (Using subqueries instead of temporary tables)

Podupit mozete navesti u odredbi from spoljasnjeg upita. 

Ako vam je potrebno da pretrazujete rezultate podupita, koji u tom slucaju igra ulogu privremene tabele.

Primer:

select * from
(select sifrakupca, ime from kupci where grad='Split')
as split_kupci;

Ovaj fajl sacuvajte kao podupiti.sql.

1. Pokrenite XAMPP. Kliknite na Admin u liniji MySQL-a ili ukucajte u address bar http://localhost/phpmyadmin/

2. Sa leve strane izaberite bazu podataka volimmotore, a sa desne izberite karticu SQL.
3. Ubacite ovaj kod i kliknite dugme "Go".

Podupiti koji vracaju redove podataka (Subqueries that return rows of data)

Svi primeri koje smo do sada videli vracali su samo po jednu vrednost. Postoje i upiti koji vracaju ceo red podataka, koji se moze porediti sa redovima podataka u spoljasnjem upitu.

Ako vam je potrebno da pronadjete sve redove u jednoj tabeli koji postoje i u drugoj tabeli. Opsti oblik sintakse:

select c1, c2, c3
from t1
where (c1, c2, c3) in (select c1, c2, c3 from t2);

All the examples we have seen so far returned only one value. There are queries that return the entire row of data, which is comparable to the data with rows in the outer query.

If you need to find all the rows in a table that also exist in the other table. The general syntax:

SELECT c1, c2, c3
FROM t1
WHERE (c1, c2, c3) in (SELECT c1, c2, c3 FROM t2);

Monday, October 19, 2015

Korelirani podupiti (Correlated subqueries)

Korelirani podupiti su nesto slozeniji jer elemente spoljnog upita mozete upotrebiti u unutrasnjem upitu. Traze se redovi iz unutrasnjeg upita koji odgovaraju redovima iz spoljasnjeg upita.

Primer:

select brojmotora, imemotora
from motori
where not exists
(select * from stvari_porudzbina 
where stvari_porudzbina.brojmotora=motori.brojmotora);

Ova fajl sacuvajte kao korelirani-podupiti.sql.

Napomena: posto je do sada kupljen svaki motor, za potrebe ovog primera, dodala sam dva nova motora. Da bi ste uneli ove podatke sledite korake 1, 2, 3.

Thursday, October 15, 2015

Easy Oil Painting in Photoshop

1. Click File than Open or (CTRL and O).

2. Navigate to the image you want and press Open button.



3. Duplicate layer by pressing CTRL and J. Rename your layer.

Jeans background in Photoshop

1. Create a new document . For this tut I used 600px x 300px.



2. Fill the layer with a blue color 183e6e.





3. Create a new layer, name it grey and fill it with grey color 7b7b7b.

Old Paper Background Photoshop

1. Create a new document . For this tut I used 600px x 300px.



2. Set the Foreground color to c59b6d and the Background color to e1caa9. 




3. Fill the layer with the background color e1caa9.
4.  Create a new layer, change name to clouds. 

Search Blog

Price za decu