- Fotók, videók mobillal
- Xiaomi 15 - kicsi telefon nagy energiával
- Samsung Galaxy A56 - megbízható középszerűség
- One mobilszolgáltatások
- OnePlus 15 - van plusz energia
- Okosóra és okoskiegészítő topik
- iPhone topik
- Samsung Galaxy S25 - végre van kicsi!
- Apple iPhone 16 Pro - rutinvizsga
- Apple Watch Sport - ez is csak egy okosóra
Ú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
- 2024-es Lenovo ThinkPad T14 Gen4 laptop, gyári garanciával, eredeti magyar billentyűzettel eladó!
- Makulátlan Iphone 13 Midnigth Black 128 GB 88% 2024.12.23-án vásárolt
- TESTRESZABHATÓ/GARIS/ Ryzen 5 5600/16GB DDR4/RX 6700 XT 12 GB/ 1 TB M.2 SSD/2 TB HDD
- ASUS ROG STRIX G16 Gamer laptop 16" -40% Raptor i9-14900HX 24Mag 16/1TB 240Hz RTX 4070 8GB QHD
- TESTRESZABHATÓ/GARIS/ Ryzen 5 2600/16GB DDR4/RX 5700 XT 8 GB/ 512 GB M.2 SSD/1 TB HDD
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


