This topic is locked
[SOLVED]

 Unknown field issue

2/22/2012 11:20:54 AM
PHPRunner General questions
M
MattS author

Hi There,
In testing my system, I added (perhaps thoughtlessly) a new field "contractdate" via mysql workbench.
I re-entered phprunner (5.3 build 7474) and refreshed my database.
I added the field to my "add" and "edit" screens, built the project and ran it.
Immediate problem :
Technical information

Error type 256

Error description Unknown column 'contractdate' in 'field list'

URL localhost/Stock/Machines_list.php?

Error file C:\xampp\htdocs\Stock\include\dbconnection.php

Error line 36

SQL query SELECT txn, guage, instock, invpo, invsales, infrom, mctype, mcoption, mfgno, newused, ourpo, outstock, outto, payterm, profit, provisiondate, provisionreason, provisiontotal, reasonin, reasonout, contract_sales, remarks, salesman, salesdate, salesprice, region, salesunit, shippingdate, shippingno, stocklocation, stocktype, valuebook, valuepurchase, unitflag, country, offerprice, mfgyear, orderdate, vendor, othermanufacturer, quoteno, quotecost, contractdate, description, photo, mfg-no, new-used, list-code,(SELECT count(*) FROM (SELECT stocktxn FROM provision ) subQuery_cnt WHERE subQuery_cnt.stocktxn=stock.txn) as provision_cnt FROM stock ORDER BY 1 DESC limit 0,20
What on earth did I do wrong? and how can I fix it??
Any information would be helpful as I'm completely stuck!!!!
Many thanks
Matt S

P
procheck 2/22/2012

I create my fields all the time in SQLyog so what you did was ok. Try closing PHPRunner and reopen it again. Do a Build All. Make sure that your fields have been selected in the Choose Fields section.
Al
P.S. - another thing is to test your SQL in your workbench before trying it in Runner

Admin 2/22/2012

After modifying database structure outside of PHPRunner you need to synchronize the database. This can be done on datasource tables screen. Right click on tables list and choose 'Synchronize'.

M
MattS author 2/22/2012

Ah Thanks for the replys guys, - Sergey I have synchronized - but I will do it again and post up the results!
Once again thanks!
MS

M
MattS author 2/22/2012



Ah Thanks for the replys guys, - Sergey I have synchronized - but I will do it again and post up the results!
Once again thanks!
MS


(The sql all checks out btw!!! )
Yeah - it still errors out <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=64491&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
I will poke around some more....

Admin 2/22/2012

Matt,
do full build just in case.
Another thing - if you have modified SQL query on 'SQL query' screen you need to proceed there and remove 'contractdate' field reference manually.
If nothing helps post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

Admin 2/22/2012

Matt,
do full build just in case.
Another thing - if you have modified SQL query on 'SQL query' screen you need to proceed there and remove 'contractdate' field reference manually.
If nothing helps post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

M
MattS author 2/23/2012

Hi There...
OK now I'm REALLY confused - I uploaded to the demo account.....and I don't get the error :@ (OK I get a somewhat corrupted screen for editing a record...but thats prolly my fault!)
contractdate seems to have been splatted at the bottom - displacing the buttons div to the top..... sigh...
<update - a new block had been entered for contractdate I moved the field and removed the block by hand - that uncorrupted the screen in part but I seem to still have some field oddities>
So it seems there is something local thats odd....
I will look further before opening a ticket!
I'm having a WTF!! moment - but they are good for me! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=64510&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />
Continuing to check!!

M
MattS author 2/23/2012

OK next steps :-
So I recreated the database locally using the sql the upload process to demo created.

I used the download system from the zip file

Locally I still get the same error
Could I have an issue with something else? The db works remotely but not locally....cached somehow? </grasping at straws>

M
MattS author 2/23/2012

OK next steps :-
So I recreated the database locally using the sql the upload process to demo created.

I used the download system from the zip file

Locally I still get the same error
Could I have an issue with something else? The db works remotely but not locally....cached somehow? </grasping at straws>
Update : stopped and started apache, used code from demo upload. Still fails locally....what could I be doing wrong???

M
MattS author 2/23/2012

OK,
by using the demo account and sneaking a test on the production server, I have established that this is an issue on the local machine only.....
So next question is -
why has this started?
and further -
how do I make it stop.....
Cheers all
Matt

Admin 2/23/2012

Matt,
this might be the case of running the wrong version of your application locally. I.e. you publish it to project1_2 directory while opening in the browser project1_1 directory.
Not sure what else this might be if it works on Demo Account and on your production server.

M
MattS author 2/23/2012



Matt,
this might be the case of running the wrong version of your application locally. I.e. you publish it to project1_2 directory while opening in the browser project1_1 directory.
Not sure what else this might be if it works on Demo Account and on your production server.


OK.....
You were close! What has happened is that a colleague has installed a separate database server on my work machine, having the same table spaces.
FOR REASONS I CAN'T QUITE COME TO TERMS WITH...... So somehow mysql workbench and PHP runner is talking to one instance and the running program is talking to the other. Fortuantely this should be simple to resolve!
Thank you for taking the time to help me - all these clues have helped solve the problem!!!
Many thanks
Matt S.

Admin 2/23/2012

I would say never let ANYONE install anything on YOUR machine <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=64525&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Keep us posted.

M
MattS author 2/23/2012



I would say never let ANYONE install anything on YOUR machine <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=64526&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Keep us posted.


Headdesk Headdesk Headdesk Headdesk Headdesk Headdesk