Ú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
- Kezdő fotósok digitális fényképei
- Konzolokról KULTURÁLT módon
- Mégis marad a Windows 10 ingyenes frissítése
- Lexus, Toyota topik
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Kormányok / autós szimulátorok topikja
- BestBuy topik
- Villanyszerelés
- gban: Ingyen kellene, de tegnapra
- Autós topik
- További aktív témák...
- GoPro Ultra Wide Lens Mod - Hero 13 akciókamerákhoz
- Lucky Miner, Bitcoin Miner, LV07, 1TH/S, 25W fogyasztással, Win 3.125 BTC Bitcoin Crypto Solo Miner
- Lenovo Quectel EM05-G FRU szám: 5W10V25829 DELL WWAN DW5825e-eSIM WWAN modemek
- Gamer márkás erős kezdő alapgép - HP OMEN by HP Obelisk Desktop 875
- Whell stand pro Logitech
- Azonnali készpénzes Intel i5 i7 i9 8xxx 9xxx processzor felvásárlás személyesen / csomagküldés
- Dell G5 15 5587 - 15.6"FHD IPS - i7-8750H - 16GB - 1TB SSD - 1TB HDD - GTX 1060 6GB - Win11 - MAGYAR
- Eladó Xiaomi Redmi A2 64GB / 12 hó jótállás
- LG 27UL500-W - 27" IPS - 3840x2160 4K - 60Hz 5ms - HDR10 - AMD FreeSync - 300 Nits - sRGB 99%
- Telefon felvásárlás!! iPhone 14/iPhone 14 Plus/iPhone 14 Pro/iPhone 14 Pro Max
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest