Dynamic Value in MySql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikkram
    New Member
    • May 2007
    • 1

    Dynamic Value in MySql

    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
    Last edited by vikkram; May 1 '07, 10:56 AM. Reason: Typing Error
  • amit007
    New Member
    • May 2007
    • 3

    #2
    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.

    Comment

    Working...