Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 1090
4 votes
Accepted

How to use current timestamp or now()

You can set the automatic value in the table itself to use CURRENT_TIMESTAMP so that anytime you add to the table, the time value is set to that. Then you don't need to insert that field in your indi …
curiouskiwi's user avatar
  • 18.7k
2 votes
Accepted

line 541, in sell user_id = current_id coming back as an error, Why? Is it caused by global ...

missing value for placeholder (:current_stock_total) That means that execute is looking for that value to fill in to one of your sql queries. …
curiouskiwi's user avatar
  • 18.7k
2 votes
Accepted

Substring SQL Search

You need to concatenate the strings '%' + sometext + '%'
curiouskiwi's user avatar
  • 18.7k
3 votes
Accepted

What is wrong with this SQL command?

As I told you on Slack: This is the syntax that will work: "INSERT INTO table(field1,field2,field3) VALUES (?,?,?)", $var1, $var2, $var3); and replacing the fields and variables as appropriate.
curiouskiwi's user avatar
  • 18.7k
0 votes
Accepted

Pset 7 Movies - 13.sql "Error When Executing Query - Too Many Statements at Once"

It's not subqueries that are the problem. You're running 3 statements, and only 1 is allowed. You can't add those indexes.
curiouskiwi's user avatar
  • 18.7k
0 votes

CS50 SQL problem set 3 Meteorite Cleaning: NULL values are not present in "meteorites" table

Don't set any defaults in your temp table. That will end up changing what you are inserting via the .csv command.
curiouskiwi's user avatar
  • 18.7k
0 votes

Finance: Buy/Sell does not insert into MySQL history table

Any field that is not allowed to be NULL must be populated by your query for the query to actually work. Be sure that you have every field. Looks like you are missing shares.
curiouskiwi's user avatar
  • 18.7k
0 votes

Finance: Can not Update and Insert to SQL

on duplicate key is not supported in sqlite3
curiouskiwi's user avatar
  • 18.7k
2 votes
Accepted

Access just the text from a db.execute return

Much like you would have seen in the CS50 Finance, db.execute returns a list of dict objects. So just as you accessed the cash value for your index page using rows[0]['cash'] you need to access your …
curiouskiwi's user avatar
  • 18.7k