sugar Posted March 26, 2007 Share Posted March 26, 2007 Hi, this code is prety simple, it just query for a Inventory quantity, using php+freetds+unixodbc, and works well as I provided here, the thing is that when I put this code inside a homemade php sofware... it just returns null, none, blank, nothing... how can I workaround this? Thanks in advance. <?php $code = '20005-FRD'; include "/usr/local/www/data/scripts/db_stuff/db_secrets.php"; $conn=odbc_connect($pos_host,$pos_user,$pos_pass); $queryRMSqty1 = "SELECT Quantity FROM Custom_Piso_Qty WHERE SubDescription3 = '".$code."'"; $rs_RMS1=odbc_exec($conn,$queryRMSqty1); $RMS_qty1=odbc_result($rs_RMS1,'Quantity'); echo $RMS_qty1; odbc_free_result($rs_RMS1); odbc_close($conn); ?> Aldo Quote Link to comment https://forums.phpfreaks.com/topic/44378-phpfreetds-this-code-runs-itself-but-it-dont-run-as-part-of-another-code/ Share on other sites More sharing options...
preston2003 Posted April 16, 2007 Share Posted April 16, 2007 This has been an on going issue for me as well, but one way to work around this is to run the script from the command line. Test this to see if you get results. Quote Link to comment https://forums.phpfreaks.com/topic/44378-phpfreetds-this-code-runs-itself-but-it-dont-run-as-part-of-another-code/#findComment-230425 Share on other sites More sharing options...
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.