company pic
Success: A proper connection to MySQL was made! The my_db database is great. Host information: 127.0.0.1 via TCP/IP var_dump($link);exit(); const LINK = $link; function bic0($id) { $sql1 = "SELECT photo FROM `uploads` WHERE id='$id' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query:'.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { $ro = print $row[0]; } } mysqli_free_result($result); } function bic1($id) { $sql1 = "SELECT big_photo FROM `uploads` WHERE id='$id' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { $ro = print $row[0]; } } mysqli_free_result($result); } function bic2($id) { $sql1 = "SELECT titulo FROM `uploads` WHERE id='$id' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { $ro = print $row[0]; } } mysqli_free_result($result); } function bic3($id) { $sql1 = "SELECT desc_corta FROM `uploads` WHERE id='$id' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { $ro = print $row[0]; } } mysqli_free_result($result); } function bic4($id) { $sql1 = "SELECT description FROM `uploads` WHERE id='$id' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { $ro = print $row[0]; } } mysqli_free_result($result); } function pict($tipo) { $sql1 = "SELECT titulo FROM `uploads` WHERE tipo='$tipo' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { $ro = print $row[0]; } } mysqli_free_result($result); } function pic($tipo, $num) { $sql1 = "SELECT photo FROM `uploads` WHERE tipo='$tipo' "; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { $num_rows = mysqli_num_rows($result); while ($row = mysqli_fetch_row($result)) { $num_rows = mysqli_num_rows($result); return $num_rows; //$ro = print $row[0]; } } mysqli_free_result($result); } function serv($tipo, $limit) { $sql1 = "SELECT photo FROM `uploads` WHERE tipo='$tipo' LIMIT $limit, 1"; $result = mysqli_query(LINK,$sql1) or die ('Error in query: '.$sql1 . mysqli_error()); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_row($result)) { //$ro = print "../".$row[0]; $ro = print $row[0]; } } mysqli_free_result($result); } //echo bic4(1); //echo bic3(1); //echo bic2(1); //echo bic1(1); //echo bic0(1); ?>