Hirdetés
Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
Ha ilyen van, miért nem kapod elő a php.net leírását?
"For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error."
Az adatbázis-kapcsolati erőforrás-azonosítót adja vissza."The returned result resource should be passed to mysql_fetch_array(), and other functions for dealing with result tables, to access the returned data."
Ott a példa is:
// Perform Query
$result = mysql_query($query);
// Check result
// This shows the actual query sent to MySQL, and the error. Useful for debugging.
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
// Use result
// Attempting to print $result won't allow access to information in the resource
// One of the mysql result functions must be used
// See also mysql_result(), mysql_fetch_array(), mysql_fetch_row(), etc.
while ($row = mysql_fetch_assoc($result)) {
echo $row['firstname'];
echo $row['lastname'];
echo $row['address'];
echo $row['age'];
}=====
Nálad most csak egy sor lesz, ezért nem kell ciklus:
...
if(!empty($rows)){
$row = mysql_fetch_assoc($res);
echo 'The country code is the following: '.$row['country_code'];
}==============================================

(#9329) whited :nincs mit!
Amúgy csak szimpla i-vel Brian.
Új hozzászólás Aktív témák
- RETRO beárazás (mobil, PC, konzol)
- Interactive Brokers társalgó
- Azonnali alaplapos kérdések órája
- Folyószámla, bankszámla, bankváltás, külföldi kártyahasználat
- Milyen RAM-ot vegyek?
- BIOS topic
- Melyik tápegységet vegyem?
- Facebook és Messenger
- Essejó: MultiCooker avagy az elektromos kukta. Ötletek, tippek, tanácsok, receptek.
- Ford topik
- További aktív témák...
- Apple iPhone 14 Pro Max - 256GB / Space Gray / 83% + Spigen tokok
- Logitech Trueforce G923 kormány és pedál szett váltóval, break moddal
- Bomba ár! HP ProBook 450 G7 - i5-10GEN I 8GB I 256SSD I HDMI I 15,6" FHD I Cam I W11 I Gar
- Bomba ár! HP ProBook 450 G6 - i7-8GEN I 16GB I 512SSD I HDMI I 15,6" FHD I Cam I W10 I Gari!
- Bomba ár! HP ProBook 450 G6 - i5-8GEN I 8GB I 256SSD I HDMI I 15,6" FHD I Cam I W10 I Gari!
- BESZÁMÍTÁS! MSI B450M R5 5600X 32GB DDR4 512GB SSD RX 6800 16GB Zalman Z1 PLUS Cooler Master 750W
- DX Racer fekete gamer, irodai szék
- ÁRGARANCIA!Épített KomPhone i5 12400F 16/32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- ÁRGARANCIA!Épített KomPhone Ryzen 7 7800X3D 32/64GB RAM RTX 5080 16GB GAMER PC termékbeszámítással
- iPhone 14 128GB Független, Újszerű állapot
Állásajánlatok
Cég: ATW Internet Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest



