Jump to content

executing a variable query


realits

Recommended Posts

hi all,

am trying to execute a query which has been generated from variables, here is the query :

mysql_query ("INSERT INTO `reportbase_data` (`series`,`sex`,`year`,`teacher`,`firstname`,`surname`,`psessions`,`attpercent`,`uabsence`,`ART1`,`ART2`,`ART3`,`ART4`,`ART5`,`ARTeff`,`ARTatt`,`ARTt1`,`ARTt2`,`ARTt3`,`DT1`,`DT2`,`DT3`,`DT4`,`DT5`,`DTeff`,`DTatt`,`DTt1`,`DTt2`,`DTt3`,`GEOG1`,`GEOG2`,`GEOG3`,`GEOG4`,`GEOG5`,`GEOGeff`,`GEOGatt`,`GEOGt1`,`GEOGt2`,`GEOGt3`,`HIS1`,`HIS2`,`HIS3`,`HIS4`,`HIS5`,`HISeff`,`HISatt`,`HISt1`,`HISt2`,`HISt3`,`ICT1`,`ICT2`,`ICT3`,`ICT4`,`ICT5`,`ICTeff`,`ICTatt`,`ICTt1`,`ICTt2`,`ICTt3`,`LIT1`,`LIT2`,`LIT3`,`LIT4`,`LIT5`,`LITeff`,`LITatt`,`LITt1`,`LITt2`,`LITt3`,`LITRE1`,`LITRE2`,`LITRE3`,`LITRE4`,`LITRE5`,`LITREeff`,`LITREatt`,`LITREt1`,`LITREt2`,`LITREt3`,`LITWR1`,`LITWR2`,`LITWR3`,`LITWR4`,`LITWR5`,`LITWReff`,`LITWRatt`,`LITWRt1`,`LITWRt2`,`LITWRt3`,`MU1`,`MU2`,`MU3`,`MU4`,`MU5`,`MUeff`,`MUatt`,`MUt1`,`MUt2`,`MUt3`,`NUM1`,`NUM2`,`NUM3`,`NUM4`,`NUM5`,`NUMeff`,`NUMatt`,`NUMt1`,`NUMt2`,`NUMt3`,`PE1`,`PE2`,`PE3`,`PE4`,`PE5`,`PEeff`,`PEatt`,`PEt1`,`PEt2`,`PEt3`,`PSD1`,`PSD2`,`PSD3`,`PSD4`,`PSD5`,`PSDeff`,`PSDatt`,`PSDt1`,`PSDt2`,`PSDt3`,`RE1`,`RE2`,`RE3`,`RE4`,`RE5`,`REeff`,`REatt`,`REt1`,`REt2`,`REt3`,`SCI1`,`SCI2`,`SCI3`,`SCI4`,`SCI5`,`SCIeff`,`SCIatt`,`SCIt1`,`SCIt2`,`SCIt3`,`hdcomment`,`tchcomment`) VALUES ('test2006','Male','Year 3','Marc Probert','Jonny','Cash','100','80','20','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','Jonny has been very good this year.','He has shown excellent progress.','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','');");

the query works fine if i manually insert it into the code as above. However if $code is equal to the query above and i insert $code into my php it does nothing.

Can anyone help ???
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.