A ver, ejercicio 1:
esto no imprime nada
Código:
<?
function mysql_fetch_all($result) {
$i = 0;
for ($i=0; $i<mysql_num_rows($result); $i++) {
$return[$i] = mysql_fetch_array($result);
}
return $return;
}
echo $return;
echo $result;
?>
esto da este error:
Could not run query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM users' at line 1
Código:
<?php
$result = mysql_query("SELECT all FROM users");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
echo $row[0];
echo $row[1];
?>
ya con las otras tareas ni os cuento... amos tios que estoy con la mierda hasta el cuello...
Kat.