No announcement yet.

Inserting to Wordpress table

  • Filter
  • Time
  • Show
Clear All
new posts

  • Inserting to Wordpress table

    I want to insert a record into post to Wordpress from a Scriptcase application. I'm stuck. I have the following code in my form's onAfterInsert event:


    There is more code but I have it commented out for testing purposes. I'm getting an error when this runs as follows:

    mysql_fetch_object(): supplied argument is not a valid MySQL result resource
    Trying to get property of non-object
    Trying to get property of non-object
    Trying to get property of non-object
    Trying to get property of non-object

    Fatal error: Call to a member function main() on a non-object in /home/premie45/public_html/protrack/wp-includes/functions.php on line 808

    Any ideas? I'm pulling my hair out on this. What am I missing?

  • #2
    Require once didn't do the job to get a valid connection and you got an empty reference to a sql resultset. Can't tell with this info why. But in general I think your approach is wrong. Just create a simple connection in scriptcase to your wp database. Then just build your application as you are used to. This way I do integration between E107 and SC which is more-or-less the same issue.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      Thanks, I'll tackle it as you suggest.