2
votes
2answers
91 views

Optimise this mysql query

This query is serving me a home page for users where a user can see all posts by him/her and his/her friends. This is an excellent query without any errors but i only wish to make it shorter if ...
4
votes
1answer
68 views

Code Reiview for an PHP PDO Queries? is there a better way to do it?

so this is my code for a equipping an item in my game dev't: try { $db = getConnection(); $db->beginTransaction(); $sql_chara_gold = $db->query("SELECT chara_gold ...
2
votes
1answer
45 views

Is there a more optimized way for this MySql Query

with below query i'm getting the results that i want but it's quite slow taking nearly 0.2 seconds (on an i5 machine). Is there a more optimized way to get the same results. Basically this query ...
5
votes
2answers
209 views

Strategy to create audit trails for a SQL database

I wish to create audit trails for specific tables and columns in my database, and document who made the change, when it was made, and what the change was. To do so, I will create the following ...
0
votes
2answers
88 views

php script to retrieve enum values from sql table

I have an sql table with multiple fields and 4 of them are enums. I wrote a script that runs thought the table and retrieve the enums and put them in a 2 dimension array. Unfortunately this script is ...
0
votes
1answer
86 views

Are these tables concepted correctly?

I want to store image (details) in my database, and want for each image the possibility to have from 1 to N versions. I want a single file (src) to be associated with a single version. There must not ...
0
votes
0answers
66 views

Building database from file C# Mysql

well as the question reads I am building a database with 3 tables. Now these tables are going to be used to store names in. Table 1 will store First Names Table 2 will store Last Names Table 3 will ...
0
votes
2answers
49 views

Delete matching ID and insert new data

Delete all matching ID Insert new data function add_date($id,$date) { mysql_query("DELETE FROM wp_opening_date WHERE Id='$id'"); $dates = explode(",",$date); foreach ($dates as $date) { ...
-1
votes
1answer
76 views

Connects to database but cannot get table [closed]

I use this php code to connect to my databse and retrieve the table food. I am able to connect to the database but no retrieve the table. I get this as a result: Host information: site.ipagemysql.com ...
1
vote
1answer
80 views

Is there a performance difference using AS keyword in SQL?

I'm working on a project in which the previous programmer seems to have loved using the AS keyword in the SELECT part of queries. I really don't like how it's written but if there is no performance ...
5
votes
1answer
411 views

PHP Login Authentication with BCrypt

So I have a php authentication script and everything works fine. But I'm very unsure about the way I programmed it (i hardcoded some stuff) and I was hoping stack could look through this and point out ...
4
votes
1answer
186 views

Please review my PDO Database wrapper

The subject is this small project - PHP/MySQL Database wrapper The three main goals of this projects are: Easy way to map database columns to object properties Simple solution to insert or update ...
4
votes
1answer
73 views

Is this MySQL database structure acceptable or can it be improved?

Recently I've tried to teach myself basic things about MySQL databases, however I received some help on stackoverflow with creating a good database structure trying to avoid redundancy as much as ...
1
vote
2answers
188 views

Mysql left joins last row

I am making a query in mysql to import users in our marketing system and need for this a lot of data like for example : Date of last order Date of last cheque created ... This are all left joins ...
2
votes
3answers
107 views

Referential MySql Design

How does this look? It has been over a year since my database concepts class and I have never worked with MySql. I have chosen InnoDB as my engine because of foreign key support using UTF-8 based on ...

1 2 3
15 30 50 per page