Professional Hypertext Preprocessor, a widely used platform for dynamic web applications.

learn more… | top users | synonyms

3
votes
1answer
45 views

Missing DB entries

I have run into a problematic situation. I oversee the administration of 5 php web pages on one server, each having their own database. All pages work like interactive forms drawing and storing data ...
-3
votes
0answers
8 views

a phpMyAdmon database question [on hold]

I have two tables in database of phpMyadmin. One table is symptoms table, and 2nd is diseases table. The symptoms table has two columns: smpid and symptom The diseases table have three columns: ...
1
vote
0answers
26 views

Help with PHP code, SELECT from database [migrated]

<?php session_start(); include ('connection.php');?> <?php $username='pablorex192'; $consulta=mysql_query("SELECT question FROM users WHERE user = $username") or die ('This is the error: ...
0
votes
1answer
35 views

No connection could be made because the target machine actively refused it. MYSQL work bench?

I have created php and Mysql site.Its Working Locally Xampp well. Finally I moved My site to server..i have Used Mysql Workbench. connected client database in Mysql Workbench in My system.when I Run ...
2
votes
1answer
25 views

DB Schema for Timesheet

Hi I want to create a web based resource tracking system which will be used by my manager using php and html. The db i am using is MySql. I have already created tables for employee, project etc. I ...
2
votes
3answers
45 views

How to show multiple names for one record but not duplicate the record?

I have a database structure like so: Car - id - carname - image - category - status Parts - partid - partname CarParts - carpartid - carid(fk) - partid(fk) - amountid(fk) Category - ...
0
votes
2answers
24 views

No connection could be made because the target machine actively refused it

I have created a PHP site using MySQL. It works well on localhost. However, when I moved it to a remote server, it stopped working. The error shown is: "No connection could be made because the ...
1
vote
2answers
30 views

MySQL “case as column” question in WHERE clause

I'm setting up a new column with this case statement: SELECT * , CASE t2.field_max_occupancy_value WHEN 'one' THEN 1 WHEN 'two' THEN 2 WHEN 'three' THEN 3 WHEN 'four' THEN 4 WHEN 'five' ...
-1
votes
2answers
27 views

SQL: Find row number with column entry of a specific string [closed]

I'm have an MS SQL Server 2014 Express database which I can search using a PHP script on my server to find if a string exists in the database. My SQL code is: IF EXISTS (SELECT * FROM TABLE WHERE ...
0
votes
0answers
21 views

How to get one result with multiple data in other table [migrated]

My problem is this. I want to put table1 in combo box with one result with different data from table2. I hope you can get my point.. sorry.. :) My tables: This is my coding. ...
-3
votes
1answer
52 views

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)

On my local WAMP stack things are working perfectly. When I upload the database on GOdaddy.com, this error shows up. Warning: mysqli_connect(): (HY000/1045): Access denied for user ...
0
votes
0answers
47 views

How to make search faster using LIKE in mysql with over 3m row?

I looking for a solution to solve this. Any idea help me plz? My table over 3m record Data in search column like '0123456789' => cannot use Full Text Search. I try put innodb_buffer_pool higher ...
-1
votes
3answers
50 views

Query to return zero entries with COUNT

I have a problem with one task. I need to display various information through two diferent queries.(or one if it could be possible) The table has these fields. Location is set to x ...
0
votes
1answer
19 views

Unknown column 'sitename' in 'where clause' [closed]

public function getSiteValues($value) { $this->db->select( 'site', 'id, option_name, option_value', NULL, 'option_name=' . $value ); // database, what ...
0
votes
0answers
60 views

How to make search faster in mysql DB with > 2m records, only numbers

I have a table with sim card data with over 2m-3m records. The design is a column sim_number = varchar(11) with data like number (0123456891) When the table is under 1m records it's still fast but ...
1
vote
1answer
26 views

Finding same values and updating rankings

thank you for taking the time to look at this. I have a simple table that I am trying to update based on the entries. table name is TOPUSER and there us a field called tu_total and tu_rank, I would ...
-1
votes
0answers
11 views

Does version MySQl 5.6.24 not support the none object orientated code of previous versions? [migrated]

I have the following code that works fine in other versions of Mysql but not in 5.6.24. Its on a testing server and not live. It works fine on the on-line server, which uses a version lower. 5. $con ...
0
votes
0answers
36 views

making everything varchar on purpose, though some fields should be int

I'm writing a PHP website for some clients which parses excel, stores the value in a database and then retrieves them. Some fields are only integers, but the clients can't make up their minds, they ...
0
votes
3answers
31 views

Alternating usernames while connecting to mysql database

My server has a max_connections value of 400 and a max_user_connections of 250. Since I am always connecting with the same user name, my effective max_connections is 250 instead of 400. To solve this, ...
0
votes
0answers
38 views

Post categories model for a user submission wedbsite

I'm building an user submission site where users can make posts to content_types: Blog, Movies, Photos, Forums. Since these content types only have slight variances I would like to keep them in one ...
1
vote
3answers
24 views

Optimizing MySQL query with left joins

Ok, so first off i am going to provide a bit of information on the database structure I have 3 indexed tables that are used in this query (though one of them should probably be a weak entity, but ...
0
votes
0answers
188 views

Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)

I am using MySQL with PHP for printing details from a database. I tried to make a new user, which was successful, although I get an error from MySQL when I tried to fetch data from it. It showed me ...
0
votes
1answer
37 views

What is the most efficient way to exclude records with a particular ID in a MySQL query for random records?

I have an api endpoint that returns X amount of random posts from a table called "posts". This endpoint is used by a mobile app. It retreives random posts by doing a SELECT COUNT(*) on the posts table ...
0
votes
0answers
56 views

I want to sync local mysql database and live server mysql database

My plan is to store data in my local MySQL database and after a time interval or when system connected to internet it will update my live MySQL database remotely Is it possible? I'm have a inventory ...
1
vote
3answers
67 views

Insert if NOT EXISTS not working

I am trying to copy data from table to another mysql table from two different databases First I get all data from first table and stored them into php variable then I loop on that var to insert data ...
0
votes
0answers
89 views

php oracle 11g client side character encoding

My oracle 11g database has utf8 character encoding. And data like ä ö ü etc. Oracle is not on the same host as my php application. The database host can be a Windows 7 machine (in Windows-1252) and a ...
0
votes
2answers
50 views

Best configuration for MySQL? InnoDB and MyISAM

I read that InnoDB is supposed to be better at writing into MySQL than MyISAM, however, I'm trying it out, by running 3000 MySQL queries(Inserting rows, 8 Columns + id)... but results haven't turned ...
1
vote
0answers
37 views

How to send MySQL query results to outfile and standard output at the same time?

I "normally" query MySQL with SELECT col1, col2 FROM tablename LIMIT 10; and sometimes instead send the output to a file with SELECT col1, col2 FROM tablename LIMIT 10 INTO OUTFILE ...
1
vote
2answers
198 views

SELECT and UPDATE in a single query while updating selective fields of duplicate records only

I have a MySQL table named Contacts_table with, say, the following contents: ID NUMBER NAME CITY 001 2222222222 John Doe Los Angeles 002 ...
0
votes
1answer
55 views

How do I perform a query on a dynamic list of tables?

I have a database named as ( conntrack ) with unknown amount of tables.I have a static table "tabidx" which has one column "date". The following table is static and its name is tabidx which provide ...
1
vote
2answers
39 views

professional services (consultants) resource allocation system

I am developing a resource allocation system using PHP and mysql. I have consultants and projects and I need to allocate the consultants on to various projects for various periods of time on various ...
0
votes
0answers
72 views

how can i connect from yahoo small business webhosting domain to remote mysql server

so far I have done these: set up remote access using Remote Mysql.Added the yahoo website's domain ip and yahoo nameservers. went on to my website on yahoo small business and set up an Aname and ...
0
votes
1answer
44 views

Storing small array of many possibilities

Let's say I need to store the text of a series of books, line per line in a database, and present them in a (CMS-based) website. I thought the correct setup would be: a 'library' table: containing ...
0
votes
1answer
19 views

How to store list data in our LMS?

I am looking at how we can store list information in our database. The example in question is regarding products. For every employee there will be a primary product and as many secondary products as ...
0
votes
1answer
53 views

Calculate total attendance for each workshop

I want to get overall attendance in each workshop. NumberOFWeeks column holds the number of weeks the workshop runs. for example Workshop 101 runs for 6 weeks meaning 6 days. So far I have done ...
0
votes
1answer
28 views

replace in String from subquery

I'm currently (trying) to optimize veery weird code. So please don't teach me about bad DB design ;-). Assuming there are two tables messages and options In the messages table theres a string like ...
0
votes
1answer
40 views

combining two different record into single result

I am fetching data from 3 tables with the help of join. My output is in JSON format. Output in JSON format:- {"order_id":"2", "location_address":"Testing location Delhi", ...
0
votes
0answers
58 views

difference between phpmyadmin and php PDO

I'm running a query in Phpmyadmin and also execute the same query with php PDO but results are not equal. What could be wrong ? This is query : SELECT dim_date_key as date ,dim_jdate_key as jdate, ...
-2
votes
3answers
63 views

How to interract with my database? [closed]

I am generally new to Databases, and I have a MySQL server with several tables which have a unique ID that is connecting them all. I am about to populate the db with data from external resources ...
0
votes
0answers
82 views

How should I store image, text type files in mysql?

I came across some answers mentioning the "disasters" of storing files outside database and saving the path inside database. I've also noticed dozens of answers about storing images- which suggest to ...
1
vote
1answer
30 views

Hostgator php code error while creating a new database table

Error is Error creating database: Access denied for user ''@'localhost' to database 'my_db' Code is { <?php $link=mysql_connect ("localhost", "cpuser_dbuser", "password") or die ('I cannot ...
0
votes
0answers
38 views

Get disk usage information of mongodb database

I have a database built in MongoDB and I need to obtain information related to the disk usage of the database through PHP. I have searched a lot but did not find relevant search results for retrieving ...
0
votes
0answers
19 views

How to create relations in database

I have two table: users and projects. In projects admin can add projects like: web design, SEO , etc.... I need to add abilty to admin can add some users to certain project... For example I need ...
0
votes
0answers
35 views

How to group two query that have already been grouped

I am creating a chat system and i have two queries: The first query selects the Max(id) meaning the last message that has been received or sent by the member that is connected and that has not yet ...
0
votes
0answers
56 views

Multiple values as single array in Query

Query: SELECT a.*, b.a_val as definition_value, c.a_id as definition_name FROM products a INNER JOIN attr_vals b ON a.sku = b.sku INNER JOIN attr_defs c ON b.a_id = c.a_id ...
1
vote
1answer
99 views

Select with limit, get total count, optimize query [closed]

The site mimics the "likes" tooltip from Facebook, the only difference is that you can like or dislike the content. The tooltip shows the first 12 users that rated the content and displays the number ...
0
votes
0answers
31 views

is it bad practice to do a loop to see if a url parameter is set?

I'm working on a way to include views on my site - if any is requested. Whenever the user access a page, that is valid, I also scan another table to see if there is any available views, and at the ...
0
votes
0answers
63 views

Schema Design for User Privacy Settings

This is how I have normalized my the schema for contact and phone numbers list: Contacts: ID (Primary Key) Name Job Title Phone Number Categories: ID (Primary key) Name Phone Numbers: ...
1
vote
0answers
114 views

PHPMyadmin transactions not commited [closed]

If I create a test table as the one below CREATE TABLE IF NOT EXISTS `TEST` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NOTE` varchar(50) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB; and ...
1
vote
1answer
91 views

PHP / MYSQL connection failures via socket under moderate load

I've done quite a bit of reading before asking this, so let me preface by saying I am not running out of connections, or memory, or cpu, and from what I can tell, I am not running out of file ...