Jump to content

Create syntax


jenniferG

Recommended Posts

We have  built a "create statement" and when we put any line after line 27, when we run it gives me an error at Line 28. we hjave tried to find the statement werror and are stumped. Even if

I put a rint $QCRT at line 28, we get an error.

Thanks 

Jennifer

 

<?php

$QCR="CREATE  TABLE MSDSTEST(

INDEXA INTEGER  AUTO_INCREMENT,

PROD_NAME varchar( 40  ) ,

LIST_PRICE varchar( 25  ) ,

SHORT_DESC text,

LONG_DESC text,

MFGR varchar( 20  ),

PRIORITY int( 4  ),

HTML varchar( 30  ),

THUMBNAIL varchar( 30  ),

IMAGE varchar( 30  ),

CATGY_1 varchar( 20  ),

CATGY_2 varchar( 20  ),

CATGY_3 varchar( 20  ),

PARTNUM varchar( 20  ),

NEWITEM int( 4  ),

ACTIVE int( 4  ),

DELIVERY varchar( 15  ),

DETAIL int( 3  ) ,

ENROLL int( 10  ),

ID int( 11  ),

ID_MAJOR int( 4  ),

ORDERCODE varchar( 25  ),

ARO varchar( 20  ),

ENTERED date,

PRIMARY KEY(INDEXA))"

//any statement here causes a statement error at line 28--//

?>

Link to comment
Share on other sites

yes - semi colin::

......

.......

......

.......

ENROLL int( 10  ),

ID int( 11  ),

ID_MAJOR int( 4  ),

ORDERCODE varchar( 25  ),

ARO varchar( 20  ),

ENTERED date,

PRIMARY KEY(INDEXA))" ;            <-  You need the semi colin at the end of your string... otherwise any code after that will cause an unexpected <something>  ; or . or , expected  sort of error will ccur

 

 

 

 

 

 

gdlk

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.