-
Notifications
You must be signed in to change notification settings - Fork 84
Update insert-data example to fix errors #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨Explore these optional code suggestions:
|
the qodo bot mentioned already the incorrect solution, please correct your change. |
If i change for
So, better to set variable before to bind pass? |
Yes you need to set a variable because the value is a reference, normally that doesn't matter because you don't use bind for constants and instead write it directly into the query but for documentation you need a variable. |
You also need to set variables for profile_key and profile_value and bind them as STRING:
|
@HLeithner @ceford i've updated the PR by adding variables. Could it be ok like this? What can be improved? Thanks! |
User description
If we run this code example, it will return errors:
Bind issue with integer
Since we are not handing a variable but an integer, it generates
Fatal error: Cannot pass parameter 2 by reference
Instead of:
better:
Namespace issue
And ParameterType is not found as not backslashed.
Should be (proposed solution):
or:
Other places in the manual can also be adjusted.
PR Type
Documentation
Description
Fixes incorrect parameter binding in code example.
Adds quoting for integer values in bind statements.
Ensures correct namespacing for ParameterType usage.
Changes walkthrough 📝
insert-data.md
Fix parameter binding and namespace in database insert example
versioned_docs/version-5.3/general-concepts/database/insert-data.md