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
https://forums.phpfreaks.com/topic/113284-create-syntax/
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
https://forums.phpfreaks.com/topic/113284-create-syntax/#findComment-582042
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.