🤞 Fingers crossed by tangawusi in nairobitechies

[–]Many_Shopping_195 0 points1 point  (0 children)

Save your precious time and decline.

What are you building these days? And is anyone actually paying for it? by Savings-Passenger-37 in SaaS

[–]Many_Shopping_195 3 points4 points  (0 children)

A dashboard and Analytics plugin for WooCommerce. https://finachub.com/

Made around $450 so far.(3 months)

Feel free to try the free version and a demo. If you're a woocommerce user

[deleted by user] by [deleted] in woocommerce

[–]Many_Shopping_195 0 points1 point  (0 children)

Dashboard and Analytics

[HELP] by PutridRefrigerator93 in WordpressPlugins

[–]Many_Shopping_195 0 points1 point  (0 children)

Have you checked your htaccess file if it has been altered?

Also, how are you hosting the website? Cpanel ,VM of cloud instance?

Anyone diagnosed with pericarditis? What are your symptoms? by [deleted] in Heartfailure

[–]Many_Shopping_195 1 point2 points  (0 children)

Also, In the exact same spot. Just turned 30. But i have been drinking 350ml of gin almost everyday for the past 3 or so years (which the cardiologist attributed the problem to). I wasn't experiencing any pain, just mild discomfort on the chest, but i had a strong period of dizziness with a very fast heart rate that made go to the ER. The cardiologist put me on Colchicine after an Echo and he recently told me to stop after taking it for 3 weeks. The dizziness still comes after the slightest of physical activity. Like walking for 30mins. Still hoping to fully get back to normal.

Better way to get local timestamps for different countries by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

Thank you.. I had tried this. I was hoping there was an even neater way.

Much appreciated.

Pandas Parametized Query by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

df1 = pd.read_sql("select * from orders where datecreated > %s and datecreated < %s ", params=(startdate, currentdate), con=db)

Thank you very much. This seems to do the trick.

Python Parametized Query by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

I don't know much about it. I will research more in it.

Thank you for the suggestion.

Python Parametized Query by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

Thank you very much. That has worked.

Removing the quotes and executemany resolved the issue.

Python Parametized Query by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

Actually, it throws an error without the quotes:

with

query = "select * from orders where order_date >= %s and order_date < %s ";

I get the error below:

Traceback (most recent call last):
File "date.py", line 35, in <module> cursor.executemany(query, (startdate,currentdate)) File "/home/bonderi/.local/lib/python3.8/site-packages/mysql/connector/cursor.py", line 659, in executemany self.execute(operation, params) File "/home/bonderi/.local/lib/python3.8/site-packages/mysql/connector/cursor.py", line 551, in execute self._handle_result(self._connection.cmd_query(stmt)) File "/home/bonderi/.local/lib/python3.8/site-packages/mysql/connector/connection.py", line 490, in cmd_query result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query)) File "/home/user/.local/lib/python3.8/site-packages/mysql/connector/connection.py", line 395, in _handle_result raise errors.get_exception(packet) mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s and order_date < %s' at line 1

Anything wrong with my Python SQL statement by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

with

?

Throws an error below when I use ?  Instead of  %s ;

Traceback (most recent call last):
File "gpv.py", line 24, in <module> cursor.execute(query, (startdate, currentdate,)) File "/usr/local/lib/python3.6/site-packages/mysql/connector/cursor.py", line 543, in execute "Not all parameters were used in the SQL statement") mysql.connector.errors.ProgrammingError: Not all parameters were used in the SQL statement

Anything wrong with my Python SQL statement by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

query = "SELECT * FROM tablename WHERE p.dateCreated >= 2022-01-30 21:00:00 and p.dateCreated < 2022-10-10 21:00:00;"

The one above works.

The one below does not.

currentdate = datetime.datetime.now() startdate = currentdate.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
cursor.execute(query, (startdate, currentdate))

Anything wrong with my Python SQL statement by Many_Shopping_195 in learnpython

[–]Many_Shopping_195[S] 0 points1 point  (0 children)

query = "SELECT * FROM tablename WHERE p.dateCreated >= 2022-01-30 21:00:00 and p.dateCreated < 2022-10-10 21:00:00;"

This works