1
vote
0answers
34 views

get three records of each category [duplicate]

sorry for my bad english and I am new to php and mysql. I've two categories and I want to fetch three records of each category and my query is: SELECT * FROM kt_media m INNER JOIN kt_category c ON ...
-1
votes
1answer
22 views

Use the value of the last mysql row in ajax call

I have a page where users can add and delete records from database without reloading page in ajax. When page loaded it displays rows from query, and you can delete each row by clicking "x" that will ...
0
votes
0answers
21 views

Displaying accuracy of MySQL SELECT queries

What is the best way to build a MySQL query so as to: Display only 100% match if it exists (one row will be returned) or, if there isn't a 100% match, Display other entries with different accuracies ...
0
votes
2answers
13 views

Import mySQL data - wrong charset

I migrate to another ISP with my website and I have problem. I ake dump my mySQL database, import in new ISP and when connect from web I have bad signs like: "wy??�?czy?? si�? podczas u??ywania, nie ...
-2
votes
1answer
27 views

HTML Form Submits, Data Not Showing in Database

I've set up a very simple HTML form to post a First Name and Surname into a MySQL database using mysqli, however the form redirects to my php script just fine, and I get no errors, but my data isn't ...
0
votes
3answers
39 views

How to use AJAX in multiple drop down in php?

I know this is a stupid question but i am new with AJAX and i tried many of the code i got from internet but still not able to do this simple thing so at last i am posting my question here something ...
0
votes
0answers
13 views

When I do a Join in Laravel 4, I want the joined table as an object

I have a table with a lot of columns in the database. Let's say 12 of the columns are foreign keys. Now I want do get all entries of that table, including the entries in the referenced tables. I ...
-2
votes
1answer
28 views

is it possible to add these up as a grand total using this code?

Is it possible to calculate a grand total with this code. I want compcase and caselight to give a grand total after the buttons are pressed. Any help would be appreciated as I can't work out a ...
0
votes
1answer
21 views

How to solve my Laravel between query on same column name

I am a big beginner, i did so many research, and im struggling with this for 3 days now. I beg you guys please help me Please i beg you guys help me I have a ManyToMany relation public function ...
0
votes
3answers
28 views

PHP how to use muliple parameters and update mySQL table with them

Im tying to update a table with the followning function in PHP. The problem is that the second parameter $work_place is not accepted and the update fails. This is my first time working with PHP and ...
0
votes
0answers
9 views

PHP/MYSQL Event calendar with recurring events

I'm trying to make an Event calendar that has recurring events (Like Google Calendar), but no matter what I do, I can't get it to work 100%! This is the tables I've got so far: EVENTS: ...
0
votes
0answers
30 views

MYSQL total value field for all payments

I've been looking around and can't seem to find the answer to this and would appreciate any help. In short I have two tables, Payments and members. I have done the below to find all payments where ...
1
vote
1answer
13 views

cannot select distinct values using codeigniter

Just want to select distinct values from db using codeigniter but it returns duplicate values. Could you please check what is wrong with my code below: $this->db->distinct('country'); ...
0
votes
0answers
20 views

Localhost blocks when inserting to DB (the data is inserted but the server doesn't response)

the code below extract data from a csv file and insert it in DB. the csv file have 3 columns : title; year; author The thing is, i don't want to insert the name of the author but his id (check the ...
0
votes
0answers
11 views

PDO dynamic parameter binding where clause AND between dates

I have a search form with several input fields. 2 of these input fields are dates. If a users fills in the From/To date, all records from/untill that date should be shown; if a users gives 2 dates, ...
0
votes
1answer
12 views

How can i fetch checkbox inserted data from my database with a query

Im busy on a checkbox search and upload for certain data. I am working with wordpress and for the storing of the data i am using a simple plugin that created a database and can insert data in the ...
0
votes
1answer
20 views

Datatables with php table

I have tried this before with a different database and worked well, but with this database it's not working. I have the following html file: <!DOCTYPE html> <html> <head> ...
-2
votes
3answers
34 views

HTML table output with PHP for loop

I am having trouble with my table as I run it through the for loop. Currently I am getting the following output: Room(s) Check-In Check-Out No. of Nights Rate Room1 04-09-2014 05-09-2014 ...
-6
votes
2answers
31 views

Deprecated: mysql_query() [duplicate]

i just update my server. it showing an error today Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the >future: use mysqli or PDO instead in ...
0
votes
1answer
20 views

Php object loading pattern

Sorry for this really bad title. I have an object class, and an objectManager class used to get all the objects. (This is an example). I can create an object with new Object($id); If the id ...
0
votes
1answer
15 views

Inserting Links in GROUP_CONCAT Display

I recently learned how to use the GROUP_CONCAT command to display results that look like this: gyrfalcon | Iceland, Mongolia meadowlark | South Dakota, Wyoming Now I'd like to know if there's a way ...
0
votes
1answer
17 views

Get second recordset from stored procedure

I have a stored procedure in MySQL. It has 2 select queries there. Here is part of it. @query="select SQL_CALC_FOUND_ROWS...LIMIT 1, 20" PREPARE query FROM @query; EXECUTE query; ...
-5
votes
0answers
14 views

FedEx Tracking API Integration through my application [on hold]

Can any one suggest me how to integrate FedEx Tracking web service into my application and I also want to updated my database when my parcel get updated. Please suggest me as soon as possible.
0
votes
0answers
15 views

Opencart - XML to MySQL - manufacturer not assigned to products

I just finished to import all the products in my Opencart installation via a script that imports all the data from an XML file that the supplier gave me. All data was correctly imported, even the ...
0
votes
1answer
28 views

Prepopulate state details for appropriate country using ajax in PHP

I need to prepopulate state details in the frmState dropdown box after selecting any country. But I'm new to ajax and I don't have enough knowledge of it. Can you help me in this routine? It's given ...
0
votes
3answers
26 views

Number_format specific item in foreach php

I got the results from select statement from mysql database. I use php to get the required data. I want specify the format only a specific item of each row to be numeric, i.e. (thousand separated). ...
0
votes
1answer
37 views

value of dropdown list from mysql

I'm trying to compose an estimate formula, and I stucked with value of dropdown list populated by MySQL. The idea of this formula is when a user select a service from dropdown list and put the ...
0
votes
6answers
50 views

Mysql - join 2 queries with limit

Im not very familiar with using 'join' in queries. I really tried solving this by my own, but it seems to be too hard. I got 2 Tables: Table 'users': +-----------------+-----------------+ | ...
0
votes
2answers
43 views

SQL how to remove a number from comma separated list, on multiple rows

Lets say i have a table in my database there looks like this: |-------------------------| | id | numbers | |-------------------------| | 1 | 1,3,5,7 | | 2 | 2,4,6,8 ...
-2
votes
1answer
41 views

associative array to string conversion issue

First off when answering please try and explain simply as possible as I am fairly new to php. Anyway my problem is is that I do not understand why my associative array to string conversion is not ...
-1
votes
1answer
33 views

change date format in sql query

$sql = mysql_query("select min(date_enter) as minval from patient where patient_name='$patient_name' and patient_dep='$dep' ...
0
votes
1answer
28 views

Unable to call php function [duplicate]

I have 2 php files, home.php and db_get.php. home.php includes db_get.php. There is a function in db.php which I am calling in home.php, which returns an array. This array is then converted into json ...
0
votes
0answers
4 views

Using phpmyadmin to import Unicode hex codepoint data to mysql

I am trying build a database containing chinese unicode data from the unihan.zip files provided by unicode. However the file only provides the characters in the assigned hex code point. (e.g. ...
0
votes
1answer
51 views

I need to optimize the my mysql quey

I have five table with join. While I was run this query its take more then 5 sec. I have like below four queries so my PHP page loading take take more then 30sec. I need to improve the performance. ...
0
votes
1answer
12 views

Category Hierarchy with Selected and Disable Mode (PHP-MySQL)

I use this code to make dropdown list like this, support selected parent when update mode Current category dropdown (select category 1.1 a child of category 1) public static function ...
0
votes
0answers
18 views

Laravel - QLSTATE[23000]: Integrity constraint violation: 1052 Column 'value' in where clause is ambiguous

I have a ManyToMany relation user_id | measurement_id | value Search query ->whereHas('measurement', function($q) use ( $from, $to ) { foreach (array_combine($from, $to) ...
-1
votes
2answers
40 views

Mysql error #1064

I am trying to create some tables on phpMyAdmin, but when I use the code below I am getting this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL ...
-1
votes
3answers
50 views

MySQL Calculate age by year month and day

I want to display data of patients age. mysql> select nama,gender,dob,TIMESTAMPDIFF(YEAR,dob,now()) as age from sampelaja; +------------------+--------+------------+------+ | nama | ...
1
vote
3answers
47 views

Mysql - How can I select column where row is in array?

I have a list of events in MySQL where there's event titles, event time, date etc. In each event there are invitees (people who got invited to the event). So basically my table events table looks ...
0
votes
0answers
26 views

Submit data and image into mysql by http-post

Submit imageView with other fields to mysql where real image stores in folder in localhost and path of the image in mysql table, but image and other fields are not store as expected. i have tried ...
0
votes
2answers
15 views

Cakephp: How to get data with specific fields on associated model

I'm using cakephp framework. I have two tables on my DB, courses and modules table. Those tables are related, courses has many modules. Basically I want to get data on courses and on modules but with ...
0
votes
0answers
24 views

Radically different timings for an action on PHP/MySQL setup

First of all, thanks to all of you whose answers I have read in the past on many subjects! :) As you'll no doubt realize, I'm not knowledgeable in performance optimisations, so am looking for help on ...
-2
votes
3answers
44 views

mysql query logic in codeigniter

I have two mysql tables memes and votes. Sample data is give below Memes table Votes table vote = 1 is for upvote and vote = 0 is for downvote. I want result something like this To ...
-2
votes
0answers
16 views

“There was an error processing your order. Please contact us or try again later.” error on checkout process - magento 1.8

I am facing issue with magento. Error is : "There was an error processing your order. Please contact us or try again later." error on checkout process I am using Magento 1.8 At the time of error in ...
0
votes
0answers
8 views

PHP Propel MySQL how can I find out which transaction was rolled back?

I get the error "Cannot commit because a nested transaction was rolled back", this happens more often when there is more traffic on my server. Is there a way to find out, which transaction triggered ...
-4
votes
5answers
34 views

Object of class stdClass could not be converted to string [on hold]

I want to list all of my databases,so i've used this code: $db_list=mysql_list_dbs($con); while($db=mysql_fetch_object($db_list)) echo $db; But i get this error "Object of class stdClass could not ...
2
votes
4answers
57 views

count rows and echo the result

I am trying to do a row count, I want to count a row (nummer) and if there is more then 1 row with the same number then echo. but no matter how many rows I have in my tabel, it only returs 0 ...
-1
votes
2answers
29 views

Pasted MySQL Select Statement Returns Empty Set, but Manual Select Works Fine

This one has 2 tech teams baffled. I have an HTML form that submits to a PHP script that generates the following simple MySQL command: SELECT * FROM table WHERE parameter='something'; The ...
0
votes
0answers
23 views

Add class into table row using php while loop which match both tables (mysql) id

I've a userkeywords table and it's look like this : ukid cdid kid 14 28 57 15 28 56 16 28 55 17 28 48 18 28 28 19 19 57 20 25 ...
0
votes
1answer
27 views

foreign key is not working in phpmyadmin

I am using two tables in my db called conference db one for paper and another for upload_data with two primary keys paperid(Primary key in paper table) and id(primary key in upload_data) id is ...