ypkumar Posted April 15, 2010 Share Posted April 15, 2010 arrrggh i sit here and write a descriptive information about my problem and tried to upload a file, the write up's all gone! grrr...... ill do it the simple way my system: Windows Vista XAMPP Lite 1.7.3 PHP Version 5.3.1 mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $ mysql/mysqli 5.1.41 my application: PHP MySQL based banking application, where user can register, login, logout, add remove and edit friends accounts, transfer funds, change password, change personal info, get transaction details etc. etc., my problem: i rewrote the application conforming to OOP concepts, and I separated the functions by its behaviour (authenciation, fetching, dbo etc). when i wrote a function for transferring funds from account a to account b, i recieve an error. Fatal error: Call to undefined function mysql_query() in C:\xampplite\htdocs\mybank\classes\func.inc on line 197 - i did not upgrade/update either PHP nor SQL, and yes, SQL is enabled on my system and works fine with other functions (register,change pasword etc.) i wrote for the same appilcation. FOR THOSE WHO WANT TO HAVE A LOOK, i have uploaded the class file here : http://pastebin.com/PGaXgmkC im not sure whats causing the error, when i remove the code to transfer the funds, it works like charm, but at the same time, the code which is removed is not wrong, it works without errors too! can anyone please look into this issue and let me know? im dying to get this one fixed since 2 days! Quote Link to comment https://forums.phpfreaks.com/topic/198601-what-happened-to-php-all-of-a-sudden-mysql_query-problem/ Share on other sites More sharing options...
andrewgauger Posted April 15, 2010 Share Posted April 15, 2010 Your function uses 2 userid variables and PHP can't tell the difference between the two. function transferfunds($srcbal,$userid,$tarbal,$taraccno,$tarsoco,$userid,$accno,$cmnt,$xframt) Quote Link to comment https://forums.phpfreaks.com/topic/198601-what-happened-to-php-all-of-a-sudden-mysql_query-problem/#findComment-1042180 Share on other sites More sharing options...
Deoctor Posted April 15, 2010 Share Posted April 15, 2010 hmm andrew already posted the error. i think that is wrong with ur class Quote Link to comment https://forums.phpfreaks.com/topic/198601-what-happened-to-php-all-of-a-sudden-mysql_query-problem/#findComment-1042184 Share on other sites More sharing options...
PFMaBiSmAd Posted April 15, 2010 Share Posted April 15, 2010 Your source code has a unicode/utf-8 character at the start of the msyql_query() statement - mysql_query() Delete or retype the mysql_query() statement to remove that character. Quote Link to comment https://forums.phpfreaks.com/topic/198601-what-happened-to-php-all-of-a-sudden-mysql_query-problem/#findComment-1042190 Share on other sites More sharing options...
ypkumar Posted April 16, 2010 Author Share Posted April 16, 2010 thanks guys, found out that unicode/utf-8 character is the culprit.. couldnt reply faster because i wanted to finish this project. Quote Link to comment https://forums.phpfreaks.com/topic/198601-what-happened-to-php-all-of-a-sudden-mysql_query-problem/#findComment-1043171 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.