Skip to main content

All Questions

Tagged with
4 votes
2 answers
233 views

Querying for vendors and categories

I'm looking for pointers on the best way to optimize my code below. The query is designed to pull for a vendor database in a separate SQL server table that I built a connection to in my wordpress site....
Mike Mann's user avatar
  • 141
-3 votes
1 answer
85 views

Preventing PHP SQL injection on login [closed]

I had a login code like this: ...
Bazim's user avatar
  • 17
2 votes
1 answer
149 views

Extracting authors and books from XML and inserting them into PostgreSQL

There is a tree of start folder, it's subfolders, their subfolders, etc. In each folder, subfolder, etc. there are the same structured XML files stored. books.xml ...
erohtpur's user avatar
4 votes
3 answers
401 views

Queries to get products selected in multiple stores

Project description I'm making a website listing products. The listing goes as following (See here): Product name Shop name Price in that shop If the product appears multiple times in the table for ...
Alpha.Ars's user avatar
0 votes
2 answers
220 views

Product list from database to web tables/boxes

I am a self-taught front-end developer, trying to land a job, the PHP and MySQL are quite new to me, since I only watched and did some code through Traversy Media courses. This is a test project, ...
Bork's user avatar
  • 21
-3 votes
2 answers
179 views

Insert employee data into a database

I've constructed code using prepared statements to try and avoid chances of SQL injections. This code is meant to insert the employees information. It does what I need it to do but I want to know if ...
chicken nuggets's user avatar
0 votes
2 answers
193 views

Version 2: Display visitor's number on your web page (changed code after getting answer for first version)

Version 2: Display visitor's number on your web page (changed code after getting answer for first version). The first version is here: Display visitor's number on your web page The "visitors&...
user avatar
0 votes
1 answer
290 views

Display visitor's number on your web page

Display visitor's number on your web page. The "visitors" table has only one column (visitor_count) and only one row. The column's initial value is 0. I know goto should not be used but then ...
user avatar
1 vote
1 answer
84 views

Updating multiple database tables when products are shipped back by customer

So, in this example I have to make these changes in my tables: Select Product Data => SKU, QTY Insert into shipping_back table Update in shipping_back to current date Update in customers to ...
kviktor1230's user avatar
1 vote
1 answer
90 views

Search controller logic to search through models and manufacturers

I have the following Laravel controller that searches through two models - Manufacturer and SearchTerm (which contains models of manufacturers, synonyms of models as well as common misspellings) using ...
Hashim Aziz's user avatar
2 votes
2 answers
179 views

Is this a good way to process an order? (SQL+PHP)

I'm making a simple webshop, it's not the full code, there are more security procedures. I'm just want to know your opinions. Thank you. These SQL tables I have: (I have more column in this table this ...
kviktor1230's user avatar
2 votes
1 answer
178 views

Prevent Column Name Collision

I have been working on a series of posts about a library to connect to databases but most of the scenarios I have to resort to some "JOIN" the problem arose when two or more tables had some ...
user avatar
4 votes
2 answers
216 views

Using a transaction to create account records

This is my first time using commit and rollback. I just need to know if this is a proper execution of the functions for this particular situation: ...
John Beasley's user avatar
3 votes
2 answers
372 views

Archiving / Moving Data from one database server to another database server

I am working on an SMS marketing project based on Yii2 Framework (PHP 7.3 & MariaDb (innodb engine)) where we have to move the logs from different tables to the archive db, which is total a ...
Muhammad Omer Aslam's user avatar
3 votes
2 answers
420 views

To-do app API made with Slim 3

I have put together the back-end (API) with the Slim framework (v3) and MySQL. In index.php I have: ...
Razvan Zamfir's user avatar

15 30 50 per page
1
2 3 4 5
13