Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

is this sql statement pnAPI compliant?  Bottom

  • I want to be pnAPI complaint. Is this SQL statement?

    Code

    $sql = "INSERT INTO $watchlisttable (
                  $watchlistcolumn[wlid],
                  $watchlistcolumn[userid],
                  $watchlistcolumn[prodid],
                  $watchlistcolumn[wstatus],
                  $watchlistcolumn[wdatestamp])
                VALUES (
                  $nextId,
                  "
    . pnVarPrepForStore($userid) . ",
                  "
    . pnvarPrepForStore($prodid) . ",
                  'A',
                  "
    . $dbconn->DBTimestamp(time()) . ")";

        $dbconn->Execute($sql);


    I am unsure of the 'A' whether it should have a pnVarPrepForStore as well and the best way to insert a time stamp.

    Thanks,

    Steve
  • It can't hurt to put the pnVarPrepForStore for consistency. The time stamp should also be passed via pnVarPrepForStore as well.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • please check also the postnuke coding standards - especially about type casting, storing values and securing forms...

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • 0 users

This list is based on users active over the last 60 minutes.