Tagged Questions
The mysql tag has no wiki summary.
0
votes
1answer
11 views
Nested while loop for getting db data. Timing out at random times because of the PHP. Any way to make this more efficient?
So today I jumbled together a script that would get data from a database, from different tables and such. I had wanted to just use simple ifs without the whiles, but I couldn't make it possible. The ...
0
votes
0answers
10 views
Why does this mysqli php call fail? [migrated]
I am trying to gather some "COUNTS" from one table to populate a value object. I am running it on my local server and it works somewhat, which I guess really means it doesn't. It is for a system to ...
1
vote
1answer
33 views
Any optimization suggestions for this php code to detect if CAPTCHA is needed?
I wish to ask if the code written below has any holes (probably it will be useful for someone else). This code checks if more than 5 attempts within the last 5 minutes were made to login. Checked by ...
1
vote
1answer
34 views
is there a better and short way to getting that array from joined sql query and converting it to superfish dropdown menu?
I'm trying to build a superfish dropdown menu from a sql query. Working example is can be seen from here check the "emlak bul" category: ...
3
votes
2answers
49 views
Using a subquery to rename columns
This is a pattern in SQL queries that I've found myself repeating recently:
SELECT
w,
x,
y,
(w + x) / y as z
FROM
(SELECT
<some gigantic and complicated query> as w,
...
1
vote
2answers
45 views
PHP MYSQL loop to check if LicenseID Values are contained in mysql DB
I have some troubles to find the right loop to check if some values are contained in mysql DB. I'm making a software and I want to add license ID. Each user has x keys to use.
Now when the user ...
3
votes
3answers
82 views
Is this DB design acceptable, or is there a better way?
Is this normalized properly ?? is there a more efficient way to design this DB ?
A Profile can have unlimited albums, any user can create an album from anyone's videos. An album may contain many ...
1
vote
1answer
68 views
<select> has extra blank <option>'s and I have no idea why. please help me get them out
This is the result of the code it has extra option tags no idea why.
I have no idea why It produces the extra option box.
Below is the result of the query. Correct number of rows correct ...
2
votes
1answer
29 views
Mysql design, Users with UserTypes
In the picture is an design of a sort of bookingsystem with mainly three different users. The Employer (seen as a company), Beneficials (seen as employee) and Organizer (The ones that makes the ...
3
votes
2answers
88 views
MySQL database connection in the constructor
I'm an absolute beginner on PHP OOP in search of the "Holy Graal" of connecting to MySQL database once and reuse this connection for the whole site
So far, I've created these files:
classes/db.php
...
1
vote
2answers
63 views
PHP: PDO (mysql) connection and query class, safety and logic
For the last few day I tried to figure out how to work with mysql and PDO.
All tough I've tried to read a lot about the subject, still there are a lot of things I don't understand.
Because of this ...
2
votes
2answers
121 views
How could I improve my database schema?
I'm a student and I've created this MySQL database schema for my Service Order Management academic project and I want to know if I need to improve it and, if so, how I could do that.
Thanks for your ...
1
vote
1answer
97 views
MySQL PDO class
Code is being reconstructed.
I made a big mistake with the method which made me cannot create transcation method.
1
vote
2answers
94 views
Please help trying to query mysql to find total time worked in a day [closed]
I'm trying to come up with the best way to add the total time an employee was clocked in.
The punch types are day in, break out, break in & day out. You would think I could just
select * where ...
0
votes
2answers
97 views
Form Ajax submission [closed]
I've built mini content management system in php. But now i need to modify code for ajax submission. now
add.php - html markup.
dbadd.php - serverside script,
addpg.js - clientside including ...