Hallo
Ich benötige Hilfe für die Convertierung von Quelltext php 5.6 nach php 7.0
Poblem 1:
Quelltext php 5.6:
klappt einwandfrei.
Quelltext php 7.0:
Ich bekomme nur folgende Meldung zurück: 1
1
|weiterlesen|
Problem 2:
Quelltext php 5.6:
Ausgabe der id erfolgt problemlos.
Quelltext php 7.0:
Ich bekomme folgende Warnungen:
Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in
/www/htdocs/w011be1f/index.php on line 158
Warning: mysql_query(): A link to the server could not be established in
/www/htdocs/w011be1f/index.php on line 158
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in
/www/htdocs/w011be1f/index.php on line 158
Warning: reset() expects parameter 1 to be array, null given in
/www/htdocs/w011be1f/index.php on line 158
Wo liegen die Fehler?
mfg
lushang
Ich benötige Hilfe für die Convertierung von Quelltext php 5.6 nach php 7.0
Poblem 1:
Quelltext php 5.6:
PHP-Code:
<?php
$rs=mysql_query("select * from artikel order by nr desc limit 0,4");
if(mysql_num_rows($rs)>0){ ?>
<?php for($i=0; $i<mysql_num_rows($rs); $i++){ ?>
<tr>
<td align="center">
<b class=b3><? echo mysql_result($rs,$i,'titel'); ?></b><br>
<b class=b4><? echo mysql_result($rs,$i,'text'); ?></b> <br>
<b><a href="seiten/news.php">|weiterlesen|</a></b>
<hr class="hr3">
</td>
</tr>
<?php } ?>
Quelltext php 7.0:
PHP-Code:
<?php
$rs=mysqli_query($mysqli,"select * from artikel order by nr desc limit 0,4");
if(mysqli_num_rows($rs)>0){ ?>
<?php for($i=0; $i<mysqli_num_rows($rs); $i++){ ?>
<tr>
<td align="center">
<b class=b3><? echo mysqli_data_seek($rs, $i); mysqli_fetch_array($rs)['titel']; ?></b><br>
<b class=b4><? echo mysqli_data_seek($rs, $i); mysqli_fetch_array($rs)['text']; ?></b>&nbsp;<br>
<b><a href="seiten/news.php">|weiterlesen|</a></b>
<hr class="hr3">
</td>
</tr>
<?php } ?>
1
|weiterlesen|
Problem 2:
Quelltext php 5.6:
PHP-Code:
<b class=b6>Fahrerwertung<br>nach <?php echo reset(mysql_fetch_row(mysql_query
("SELECT MAX(rennen_id) as max FROM ergebnisse_19"))); ?> von 21 Rennen</b><br>
Quelltext php 7.0:
PHP-Code:
<b class=b6>Fahrerwertung<br>nach <?php echo reset(mysqli_fetch_row(mysql_query
("SELECT MAX(rennen_id) as max FROM ergebnisse_19"))); ?> von 21 Rennen</b><br>
Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in
/www/htdocs/w011be1f/index.php on line 158
Warning: mysql_query(): A link to the server could not be established in
/www/htdocs/w011be1f/index.php on line 158
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in
/www/htdocs/w011be1f/index.php on line 158
Warning: reset() expects parameter 1 to be array, null given in
/www/htdocs/w011be1f/index.php on line 158
Wo liegen die Fehler?
mfg
lushang
Kommentar