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
- iPhone topik
- Call of Duty: Black Ops 7
- sziku69: Szólánc.
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Fűzzük össze a szavakat :)
- Mibe tegyem a megtakarításaimat?
- Media Player Classic és Home Cinema (MPC-HC)
- Vicces képek
- Luck Dragon: Asszociációs játék. :)
- exHWSW - Értünk mindenhez IS
- 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!
- Telefon felvásárlás!! iPhone 15/iPhone 15 Plus/iPhone 15 Pro/iPhone 15 Pro Max
- GYÖNYÖRŰ iPhone 13 Pro 256GB Sierra Blue - 1 ÉV GARANCIA, Kártyafüggetlen, 100% Akkumulátor,MS3379
- Dell latitude, precision, xps, magyar világítós billentyűzetek eladóak
- Jackson elektromos gitár
- GYÖNYÖRŰ iPhone 13 mini 128GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS3317, 100% Akksi
Állásajánlatok
Cég: BroadBit Hungary Kft.
Város: Budakeszi
Cég: ATW Internet Kft.
Város: Budapest



