Ú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
- Autós topik látogatók beszélgetős, offolós topikja
- Disney+
- Xbox tulajok OFF topicja
- Ingatlanos topic!
- Mikrotik routerek
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Philips LCD és LED TV-k
- Milyen billentyűzetet vegyek?
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Trollok komolyan
- További aktív témák...
- Playstation 5 lemezes - Gran Turismo 7, Tony Hawk's Pro Skater 1-2 eladó!
- ROG Ally (2023) RC71L + JSAUX HB1201S
- Vadonatúj, bontatlan iPhone AIR 256GB fekete és kék KÁRTYAFÜGGETLEN! 1 év Apple garancia!
- 3D nyomtatás kiváló minőségben / számlával / akár 9 színnel / széles anyagválaszték,
- HP,15.6",250 G6,8.gen.core i5 (8X4,0Ghz)8-32GB RAM,256GB-1TB SSD,nagyon jó akku,Win.11,szép
- új akku Ár/ÉRTÉK BAJNOK! Dell Latitude 5330 i3-1215U 6magos! - 16GB 256GB 13.3" FHD 1 év garancia
- GYÖNYÖRŰ iPhone 13 256GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS3205
- Telefon felvásárlás!! Xiaomi Redmi 9, Xiaomi Redmi 9AT, Xiaomi Redmi 10, Xiaomi Redmi 10 2022
- HP EliteOne 800 G5 All-in-One 32GB 1000GB 23.8" Érintőkijelző!! 1 év garancia
- ÚJ Microsoft Surface Laptop 7 13.8" 2K - 120Hz Érintő - Snapdragon X Elite - 16GB - 512GB-2 év gari
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest