By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,347 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,347 IT Pros & Developers. It's quick & easy.

Dynamic Value in MySql

P: 1
Hi friends,

I am developing internal control system with PHP-MySql & have one problem.

I want to enter dynamic variable into MySql like :

I have checked report of Mr. $userName from $previousDate to $currentDate…..”

Wherein - $username, $previousDate, $currentDate will be called from other table.

My codes :

[PHP]INSERT INTO `checkReport ` (`schID`, `schNo`, `noteNo`, `subschName`, `content`) VALUES (1, 1, 'a', '', ' I have checked report of Mr. ‘.$username.’ from ‘.$previousDate.’ to ‘.$currentDate.’ ….)[/PHP]

which is not working… Please guide me through.

Thanks,
Vikram
May 1 '07 #1
Share this Question
Share on Google+
1 Reply


P: 3
INSERT INTO `checkReport ` (`schID`, `schNo`, `noteNo`, `subschName`, `content`) VALUES (1, 1, 'a', '', ' I have checked report of Mr. ‘.$username.’ from ‘.$previousDate.’ to ‘.$currentDate.’ ….)

it will never work

make a variable and store (have checked report of Mr. ‘.$username.’ from ‘.$previousDate.’ to ‘.$currentDate.) in that variable and then store this variable in table.use ' ' when writes value.
May 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.