Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 688 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sql insert where statment need help 0.o???

#1
Trying to use the following statement in php using pdo and sqlite
keep getting errors
The separate vars can be echo'd out, so there is no problem with the inputs.
Have no problem doing a simple insert (for new row any column) and select whatever from table column where row = 1
Looks so simple i just can't quite get i right

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

php code

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


cheers

:biggrin:

Num5kull
Reply

#2
With your SQL INSERT INTO Statement, you've enclosed the id column In single quotes and you haven't ended your SQL query In a semicolon, hence the syntax error near "WHERE".

The value of '100' Is fine (single quotes), but given the id column Is only one word (not separated) you can either enclose It In "Back Ticks", or leave It as Is, but NOT single quotes.

Example:
Column In Back Ticks

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


No Back Ticks

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Either of the two will work. Don't forget to use the semicolon at the end of the statement.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through