Re: How to query database using variable and get all results not just one row Programming Web Development by Chris_103 …(). Here's how you can modify your code: ```php // Query database to retrieve records associated with the user $sql = "SELECT… Re: How to query database using variable and get all results not just one row Programming Web Development by Biiim logically, it would be because `WHERE variable_name = :variable_name` matches 1 row in your table maybe try a `var_dump(str_replace(':variable_name',"'some_value'",$sql));var_dump($records);`? run the sql on whichever way you use to access your DB directly I don't use PDO so i'm not too familiar on how it returns results, either … Re: How to query database using variable and get all results not just one row Programming Web Development by Mikekelvin … Assuming $currentUser holds the identifier of the current user // Query database to retrieve records associated with the current user $sql = "…This identifier should uniquely identify the current user in your database. By binding this value to the :variable_name parameter in … records associated with the current user in your database. Using Natural Language to Query SQL Databases with Python LangChain Module Programming Computer Science by usmanmalik57 …) response = agent_executor.invoke(query) return response ``` ## Generating Response from PostgreSQL Database Generating a response from the LangChain SQL agent is straightforward… top 5 products with the least sales from the Northwind database in a MySQL server. ``` mysql_uri = 'mysql+mysqlconnector://root:mani123@… Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain Programming Computer Science by usmanmalik57 …most accurate. The following script creates a vector database storing the vector embeddings for all the pages in…along with the context information retrieved from the vector database. The context information contains the answer to our …to provide the context information by searching the vector database containing the knowledge base. Then, we pass the… Paris Olympics Ticket Information Chatbot with Memory Using LangChain Programming Computer Science by usmanmalik57 … the PDF document. We store the embeddings in a vector database. ``` embeddings = OpenAIEmbeddings(openai_api_key = openai_key) text_splitter = RecursiveCharacterTextSplitter() documents = text_splitter.…message history and return the matching documents from our vector database. The template will have a `MessagesPlaceholder` attribute to … How can I upload a tar.bz2 file to openstack swift object storage container Programming Software Development by Hanginium65 …=keystone_session) # Create a new object with the contents of Netbox database backup with gzip.open('/var/backup/netbox_backups/netbox_2024-03-16…/gzip' ) # Confirm the presence of the object holding the Netbox database backup obj1 = 'object_netbox_2024-03-16.psql.gz' container = 'netbox-backups… Re: Do you participate in any other communities? Community Center Geeks' Lounge by Dani … neither of them could figure out how to get the database off of vBulletin 3 and onto a more modern system… plug-ins being used that, according to Brett, left the database severely corrupted and unusable. He ended up selling off the… Brett to see if he had *any* versions of the database anywhere that he could give me, and see if I… Re: Improve HAVING BY performance Programming Databases by Dani … certainly not as sophisticated as storing the majority of our database and updating in realtime. (We also use Memcached, but… and persistence.) > Another option is to switch your Database server to an M2 SSD if you haven't already… are insanely fast That's super duper crazy! Our database servers definitely use SSDs, but I had never heard … Re: Improve HAVING BY performance Programming Databases by Biiim … attention to internet security. Another option is to switch your Database server to an M2 SSD if you haven't already…: 0.14ms vs 0.06ms. I haven't tried a Database on one yet but based on the above stats it… Re: Improve HAVING BY performance Programming Databases by toneewa … MySQL in the past day. I setup a server, a database, and wrote a C++ program to connect to it. It… Re: Improve HAVING BY performance Programming Databases by Dani … or equal to $4. I'm not sure what your database looks like, but if there are lots of rows with… Re: Improve HAVING BY performance Programming Databases by Dani …. Even then, it totally depends on the data in the database itself. The same query can be fast for some datasets… Re: Improve HAVING BY performance Programming Databases by toneewa … done. I added another test with MAX(Price). With a database over 305K rows, 3 columns, MySQL Workbench is unstable importing… Re: DaniWeb Auto Answer A.I. feature Community Center Meta DaniWeb by Dani Pardon my cluelessness here. A $300 video card can efficiently perform complex AI tasks against DaniWeb’s entire database in real time? Missed the link to the Python API. A module that comes with Python, doesn´t register? Programming Web Development by Audun Hi Title: A module that comes with Python, doesn´t register. This is the error message: %Run 'open cv - tot.py' Traceback (most recent call last): File "C:\Users\Audun Nilsen\open cv - tot.py", line 1, in <module> import cv2 # OpenCV for image processing ModuleNotFoundError: No module named 'cv2' I double-checked to … Re: A module that comes with Python, doesn´t register? Programming Web Development by Reverend Jim I tried installing python 3.12 and had the same problem. I typically wait a bit before installing the latest and greatest because I have found it can take a while before packages are upgraded to be compatible (usually wxpython). I was able to install the individual packages under python 3.10. I know that the "next to latest and greatest" … Mariadb10.11.6 Glarea single failed node startup stuck failure Programming Databases by mx_983 Basic background information Mariadb Ver 15.1 District 10.11.6 MariaDB Glarea cluster, one with three nodes: Node1:192.168.18.78 Node2: 192.168.18.79 Node3: 192.168.18.80 Among them, Node1 node was restarted after a power outage of 1 hour, and after executing the system ctl start mariadb, it was stuck for a long time (running for 6 hours) … Re: Mariadb10.11.6 Glarea single failed node startup stuck failure Programming Databases by rproffitt From https://stackoverflow.com/questions/78269177/mariadb10-11-6-galera-single-failed-node-startup-stuck-failure where they call it out as a bug waiting for a fix. Re: Mariadb10.11.6 Glarea single failed node startup stuck failure Programming Databases by rproffitt The problem is still unresolved. Until the bug is fixed. Be sure to tell all that you don't accept this as a bug and want a fix now. Re: Mariadb10.11.6 Glarea single failed node startup stuck failure Programming Databases by rproffitt I wonder if the last other stable releases show this issue? "Stable release: 11.3.2 / 16 February 2024; 46 days ago" or the most recent release of MariaDB 10.11: MariaDB 10.11.7 Stable (GA) That is, many fixes don't get released for out of date versions. The new version is how many fixes are issued. Re: Mariadb10.11.6 Glarea single failed node startup stuck failure Programming Databases by toneewa I wonder how these IP addresses are issued. Static, dynamic, or is DHCP on? It reminds me of the time a network printer that stopped working, after the power went out. Other devices connected to the network after it's setup. Then, after rebooting, it got a different IP, but the host still thought it was on the old one. I've seen the same thing when… Re: How can I upload a tar.bz2 file to openstack swift object storage container Programming Software Development by Salem First, let's prepare two tar files using different compression schemes for demo purposes. $ cat foo_1.txt This is file 1 $ cat foo_2.txt This is file 2 This is file two This is file too # Three tar files, two compressed and one uncompressed for reference $ tar -j -c -f foo.tar.bz2 foo_1.txt foo_2.txt… Re: How can I upload a tar.bz2 file to openstack swift object storage container Programming Software Development by Hanginium65 Good day, Salem. My apologies for taking so long to reply to your suggestion. I refactored my code to read the contents of the tar.bz2 file and then pass them as a file-like object to the 'put_object' and also to change the content type for the file transfer to "application/octet-stream". The first was sent through to object storage … Re: How can I upload a tar.bz2 file to openstack swift object storage container Programming Software Development by Salem I don't understand why you need to extract all the files from the compressed `tar.bz2` just to upload to a backup. Also, line 69 is now meaningless having just posted only a snippet of the code. Before the error, what was the last `logger.info` message? Re: Things I hate about TV shows Community Center Geeks' Lounge by Dani Currently the thing I hate most about TV shows is how much time elapses between seasons. I feel like I've been waiting for season 2 of Severance on AppleTV for *forever*! (It's been over 2 years already since season 1 debuted.) Speaking of that, is there ever going to be a second season for Squid Game? I can't imagine that Netflix wouldn’t invest … Re: Things I hate about TV shows Community Center Geeks' Lounge by Reverend Jim Fer sher. You pretty much have to watch the previous season again before you start the next one. I'm still waiting for season 2 of The Old Man (Jeff Bridges, John Lithgow). At my age sometimes I lose the thread if two weeks goes by between episodes. Sometimes I'll wait until the end of a season before I watch any of it. I especially hate it when a … Re: Things I hate about TV shows Community Center Geeks' Lounge by pritaeas > is there ever going to be a second season for Squid Game Yes, already announced, available soon. Re: Things I hate about TV shows Community Center Geeks' Lounge by Dani That's my point, though. Gone are the days when a show would break for a summer and the next season would start up again in the fall. Re: Things I hate about TV shows Community Center Geeks' Lounge by Reverend Jim >Gone are the days That's pretty much the case for everything. I remember when TV sucked all through summer vacation and I couldn't wait for the end of September for the new seasons to start. Of course it was bittersweet because September also meant back to school. I'll mention a few more things that may have been mentioned before but I …