10,940 Topics

Member Avatar for
Member Avatar for onlymani

am using MySQL database. When I execute a query which the main table(20 thousands of rows) is joined with the other 5 tables, it takes 90 seconds to return me the result. I then added indices into each of the criteria(where clause). Then the execution time drops from 90 seconds …

Member Avatar for smantscheff
0
66
Member Avatar for gunnarflax

Let's say that I want to retrieve rows from just one table and exclude rows with certain ID's. Hypothetical table: [CODE] +----+-------+------+ | id | value | type | +----+-------+------+ | 1 | foo | cool | +----+-------+------+ | 2 | bar | cool | +----+-------+------+ | 3 | lor …

Member Avatar for gunnarflax
0
101
Member Avatar for Xtremefaith

So I received awesome help from here before but forgot to ask at the time about one small thing. He taught me how to exclude my "ID" field displaying and about the implode function in PHP but if I display my data using it is there a way to make …

Member Avatar for Xtremefaith
0
505
Member Avatar for Danny247

[CODE]$wordpress_user_db_query = mysql_query("INSERT INTO cedsite_wrdp1.wp_users (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('".$username."', '".md5($pass)."', '".$username."', '".$email."', '', '".$date."', '', 0, '".$username."');");[/CODE] Using PHP I am trying to do that, but it isn't working. Can someone help?

Member Avatar for Dragonbaki
0
251
Member Avatar for DaveyMoyes

Hi this is my first post on DaniWeb.... the information has helped me in the past but im seriously stuck.... Help would be very much appreciated.. Im trying to create a form where the user can upload 5 pictures to a mysql database (members) field names are img1, img2, img3, …

Member Avatar for red_ruewei
0
143
Member Avatar for stbtwitter

Hello, I have a mysql field that is a blob and I use encode to encrypt the values for that field. One of the values is: 62756d7069886d66 When I use the salt: ulabula to decode it via phpmyadmin, the correct value returns: 62756d7069886d66 However when I do the exact same …

Member Avatar for smantscheff
0
96
Member Avatar for LianaN

Hello! I run SQL queries from JAVA program (an example is shown below). My question is: Is it possible to run SQL query, if column names are defined in an array and the array size is not known apriori? Thanks! [CODE] public void setQuery(String query) { try { int rs …

Member Avatar for LianaN
0
192
Member Avatar for Boskor

I have this code: [CODE]$sql=mysql_query("select distinct one.ime_kategorije AS ime_kat,count, two.kategorija_g AS kategorija_g FROM (SELECT *, COUNT(DISTINCT kategorija_g) AS count FROM galerija_slik LEFT JOIN kategorija ON galerija_slik.id_kat=kategorija.id_kategorija GROUP BY id_kat) AS one JOIN ( select * from galerija_slik group by kategorija_g) AS two WHERE one.id_kat = two.id_kat;"); while ($row=mysql_fetch_array($sql)) { $kategorija=$row['ime_kat']; …

Member Avatar for Boskor
0
72
Member Avatar for vedro-compota

Hello)) I have a text file with a script that can be used to create an Oracle database, but I want to use this script to create MySQL one) Unfortunately, not all commands are similar. I've already changed the commands for creating tables. And now I can not understand how …

Member Avatar for vedro-compota
0
67
Member Avatar for vedro-compota

Hi guys! I can not understand - what is wrong with this simple line - [CODE]create table SUBJECT ( SUBJ_ID NUMERUC not null, SUBJ_NAME VARCHAR(100));[/CODE] error message -[QUOTE]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to …

Member Avatar for vedro-compota
0
99
Member Avatar for Rizzuti

Hello! I’ve got three tables that I want to link together. When I try to upload images and text throught a form, the web browser show this error message: [QUOTE]Error, query failed 1452-Cannot add or update a child row: a foreign key constraint fails (`mn000532_almacen`.`images`, CONSTRAINT `images_ibfk_1` FOREIGN KEY (`itemID`) …

Member Avatar for Rizzuti
0
250
Member Avatar for Sahilsahni

[CODE]<?php include("includes/connection.php");?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php echo $sql= "SELECT * FROM forms WHERE today >= CURDATE() - INTERVAL 30 DAY"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) {echo $City= $row['City']; echo $Name=$$row['Name'];} ?> </body> </html> [/CODE] i just …

Member Avatar for smantscheff
0
2K
Member Avatar for Danny247

[CODE]$wordpress_user_db_query = mysql_query("INSERT INTO cedsite_wrdp1.wp_users (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('".$username."', '".md5($pass)."', '".$username."', '".$email."', '', '".$date."', '', 0, '".$username."');");[/CODE] Using PHP I am trying to do that, but it isn't working. Can someone help?

Member Avatar for pritaeas
0
74
Member Avatar for rajeesh_rsn

Hi friends , I had a table which contains tourist information of a country. the table structure as follows state | place | placeid | activities ============================================================================== state1 | palce 1 | 12457 | swimming,trekking,hillstation,waterfall | ------------------------------------------------------------------------------ state2 | palce 2 | 12458 | beach,backwater,ayurveda,fishing | ------------------------------------------------------------------------------- Ok now I …

Member Avatar for lili.edryana
0
90
Member Avatar for Sahilsahni

Hi, i have made a form in which people fill out their details and its gets saved in database with [CODE] $today = date("F j, Y");[/CODE] now i want to make a search for that forms with date , like Search with in last 3 days or Last 6 months. …

Member Avatar for Sahilsahni
0
1K
Member Avatar for siva87
Member Avatar for smantscheff
0
54
Member Avatar for Cheesecake87

[CODE]<cfquery name="Sort" datasource="JD8989776555"> SELECT * FROM ResMenuItems ORDER BY "ItemOrder" ASC </cfquery> <p>Output</p> <cfoutput query="Sort"> #ItemOrder# - #ItemName#<br /> </cfoutput> <p>loop</p> <cfloop query="Sort"> <cfoutput>#ItemOrder# - #ItemName#<br /></cfoutput> </cfloop>[/CODE] I am honestly not joking :S That code there, is here : [url]http://jadedragon-co-uk.securec12.ezhostingserver.com/admin/MenuManager/TEST.cfm[/url]

Member Avatar for Cheesecake87
0
158
Member Avatar for bleedi

Hey! I've got a SELECT query which fetches rows based on a search string using LIKE command. I was wondering, how could I make it to skip "The " from the beginning of the value? For example, I have TV series listed in the database, like "Futurama", "The Office", "The …

Member Avatar for d5e5
0
181
Member Avatar for mani_1991

hai, friends i have problem in inserting image into mysql database using a small java program.... here is my code for inserting image into database............ [CODE] import java.io.*; import java.sql.*; class ImageUpload { public static void connection() { Connection con=null; Statement st=null; PreparedStatement pst=null; try { Class.forName("com.mysql.jdbc.Driver"); System.out.println("driver is loaded"); …

Member Avatar for SasseMan
0
242
Member Avatar for dev.vini

hey guys i m new in mysql can u tell tat how select data through a store proceedure in mysql or how i hvae to put a select query in store proceedure of mysql pls help me........ thanks

Member Avatar for hielo
0
59
Member Avatar for dev.vini

[CODE]DROP PROCEDURE IF EXISTS `uniqueId`; DELIMITER $$ CREATE PROCEDURE `unique`(IN deepak VARCHAR(100),OUT UNIQUEID INT) BEGIN SELECT UNIQUEID FROM products WHERE PRODNUM='deepak'; END$$ DELIMITER ;[/CODE] how to select uery work in this procedure.............help me

Member Avatar for smantscheff
0
60
Member Avatar for jpknoob

Hi all, i decided to try and make a php shopping cart with sessions and manged to do so with the help of online turorials and references. However, i decided to try and pass over multiple items form a table, but i must have gone wrong somewhere, as some of …

Member Avatar for jpknoob
0
74
Member Avatar for LONGWAY

Hi, i have four tables: books info autor publisher ---------- ------------- --------------- -------------- id id id id bookname type name publisher name autor_id year second name quantity publisher_id autor year country I tried with this relations but it did not work (is this normalization ok) relations: `autor.id = books.autor_id` AND …

Member Avatar for LONGWAY
0
118
Member Avatar for albertkao

This SQL operation will get the desired Proposal_ID. [CODE]SELECT P.Proposal_ID, AVG(c.Task_Good_Idea) AS Average FROM proposals P, proposal_appraisal c LEFT OUTER JOIN users b ON (c.Evaluator_ID = b.User_ID) LEFT OUTER JOIN submission_status d ON (c.Primary_Evaluation_Status_ID = d.submission_status_ID) WHERE (P.Proposal_ID = c.Proposal_ID) AND P.Proposal_ID >= 931 AND d.Submission_Status_ID = 2 GROUP BY …

Member Avatar for hielo
0
97
Member Avatar for showman13

Hi All, Another roadblock on my way to fame and fortune... LOL I am attempting to convert a csv file to a mysql table, and am using a converter that takes the csv and converts each line into an insert statement. that part works fine. But the issue I run …

Member Avatar for hielo
0
130
Member Avatar for alanlee9898

Hi, I need help to insert multiple checkbox data into MySQL using PHP. I'm new here, any code I can refer? I have a database name called subject_name and there is only 2 column in the table which is id and subject. I would like to insert multiple checkbox data …

Member Avatar for angelos33
0
9K
Member Avatar for albertkao

Given the following two SQL operations: [CODE]select prod_Id, P.proposal_id, P.institution_Name from proposals P group by P.proposal_ID having mark >= 50 order by P.proposal_id desc select prod_id, P.proposal_id, PA.evaluator_ID, U.user_Given_Name, U.user_surname from users U, proposals P LEFT outer JOIN proposal_appraisal PA ON (P.proposal_Id = PA.proposal_id) where PA.evaluator_ID = U.user_id group by …

Member Avatar for d5e5
0
94
Member Avatar for albertkao

How to calculate an average and use that average to select some data? e.g. for this query and its result. [CODE]select Proposal_ID, Mark, AVG(Mark) AS Average from proposal where (Proposal_ID >= 931) GROUP BY Proposal_ID 931 20 22.2222 935 30 22.2222 936 30 21.1111 967 30 25.5556 968 30 20.0000 …

Member Avatar for smantscheff
0
109
Member Avatar for dre-logics

I use Visual studio 2008 I use MYSQL 5.1 I want only to backup database Test to to a specific directory. I use the [COLOR="Green"]application settings [/COLOR]to determine which directory(see attachment). [COLOR="Green"]Green[/COLOR] shaded code works perfect. [COLOR="Red"]Red [/COLOR]shaded code works not!! This is with My.settings. I can not see the …

Member Avatar for dre-logics
0
621
Member Avatar for victordq

Hi guys, I'm new to forum and to Python. I need some help with the python - MySQL interaction. I'm creating a program for my conclusion project in College and it's not working. I gotta present it on Wed, 11/24, and I'm really desperate for some help. It's suposed to …

Member Avatar for victordq
0
198

The End.