Images saved in the DB and in the project root folder do not appear on the site

0

I'm working on a website, using php language in netBeans and easyphp p bank. the site registers companies and services and it is also possible to search by name the same. (this is in the process of development)

clicking the image looks like the error:

  

You have an error in your SQL syntax; check the manual that   correspond to your MySQL server version for the right syntax to use   near 'code_EMPRESA']? > '' at line 1

lines of code:

class search company and index:

class Search Company:

<?php
require_once "EmpresasDAO.php";
$objBDEmpresas = new EmpresasDAO();
// busca por nome
if (isset($_GET['HTML_nome_EMPRESA'])) {

    $busca = $_GET['HTML_nome_EMPRESA'];
    $rsEmpresas = $objBDEmpresas->listaEmpresas(2, $busca);
}
// busca por regiao
if (isset($_GET['reg'])) {

    $codReg = $_GET['reg'];
    $rsEmpresas = $objBDEmpresas->listaEmpresas(3, $codReg);
}
?>
<table align="center" width="60%">
    <tr>
        <?php
        //enquanto houver empresas no rsEmpresas
        while ($tblEmpresas = mysql_fetch_array($rsEmpresas)) {
            ?>       
            <td align="center">
                <a href="index.php?codPg=110&codEmp=<?= $tblEmpresas['codigo_EMPRESA'] ?>">
                    <img src="_images/_system/<?= $tblEmpresas['logo_EMPRESA'] ?>" width="150" height="100"><br>
                    <?= $tblEmpresas['nome_EMPRESA'] ?>
                </a>
            </td>            
            <?php
        }
        ?>
    </tr>
</table>

/////////////////////////////////////////////// ////

   
    </div>

    <div id="DivMenu">
        <?php
            include "MenuHome.php";                
        ?>
        <hr>
    </div>

    <div id="DivConteudo">
        <?php
            //mapeamento de links

            if(!isset($_GET['codPg']) || $_GET['codPg'] == 0){
                include "ListaEmpresas.php";
                //include "ListaServicos.php;
                //include "ListaParceiros.php;
            }else{
                 if($_GET['codPg'] == 100)
                    include "BuscaEmpresa.php";
                if($_GET['codPg'] == 110)
                    include "PerfilEmpresa.php";                   
                if($_GET['codPg'] == 120)
                    include "FormEmpresas.php";                   
                if($_GET['codPg'] == 130)
                    include "FormServicos.php";                   

            }
        ?>

    </div>     

</body>

I would like to understand why the images do not appear.

    
asked by anonymous 06.04.2017 / 10:47

0 answers