Jump to content
Fórum Script Brasil
  • 0

Erro ao criar tabela no SQL


eDuArDoXP

Question

Olá pessoal meu problema creio que seja simples mas não sei resolver.

Tenho esse codigo no php e queria linkar no sql mas não consigo!

<td valign="top" bgcolor="#C3C3C3"><div align="left"><img src="imagens/noticia.jpg" width="208" height="18"><br>
                        <marquee direction="up" scrollamount="1" width="208" height="165">
                        <?php
                      $sqlnoticia = "SELECT * FROM noticias ORDER BY id DESC LIMIT 0,10"; 
                                          $qrynot = mysql_query($sqlnoticia,$base);
                                          while($regnot = mysql_fetch_array($qrynot, MYSQL_ASSOC)){
                                          echo "<span  class='linkes2'><a href='".$regnot['link']."' target='_blank'>";
                                          echo $regnot['data']." ".stripslashes($regnot['texto']);
                                          echo "</a></span><br><br>";
                                          }
                                          ?>
                        </marquee>
                      </div></td>
Tentei criar essa tabela no sql
CREATE TABLE noticias 
(
data date not null auto_increment,
texto varchar(100)
link varchar(100)
);

aparece esse erro:

#1063 - Incorrect column specifier for column 'data'

O que estou fazendo de errado?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...