Jump to content
UBot Underground

How do I get mysql insert results?


Recommended Posts

Im finding that if I have a data mismatch, or something, strange that causes my insert statement to fail, I get no indication of the failure to execute the command.

 

Can someone help me understand ways to recognize if my sql command works or not.

 

Obviously I can tell if a select works by whether I get data or not...

 

I tried using a "set" node for a new variable, and putting my sql command in the new value field, but the node wont accept the sql command.

 

I was thinking I could get a -1 for a failed insert, or something of the like.

 

Whether or not I have a data issue, I would like to get a confirmation that an insert worked in the future.

 

Thanks.

 

-Chris

Link to post
Share on other sites

Here ya go:
 

 

http://www.ubotstudio.com/forum/index.php?/topic/12030-tutorial-example-codes-how-to-use-mysql-with-ubot-studio/?hl=%2Bdatabase+%2Bcommand

 

Just follow the steps.

 

You already have  the answer to your question "Obviously I can tell if a select works by whether I get data or not..."

Link to post
Share on other sites

Thanks AutomationNija:

 

Yes, Im not looking to confirm the select statement, its the insert.   I guess I can run a select statement right after the insert to see if what I had hoped was in there, would be in there, but I was running into the scenario where the data Im inserting into a mysql table isnt unique to that table.... if it is a duplicate record, possibly a few times over, how do I know which one I inserted, in order to confirm it went in there?

 

I guess, one option is to tag a date and time to the insert, then query to see if that record with the date and time made it in or not.

 

Any other suggestions?

 

Thanks,

 

Noob

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...