2,403 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for J.C. SolvoTerra

![2680a256fcbf10c900499c36825b3e55](/attachments/large/4/2680a256fcbf10c900499c36825b3e55.png "2680a256fcbf10c900499c36825b3e55") In the above model I have an Images table which holds all the filenames relevant to the image. I have two relationship tables (Image_Has_People and Image_Has_Event). Both of these tables have an FK ImageID linked to the Image table's PK idImage. I'm wondering, if I set both relationship …

Databases mysql
Member Avatar for David_50
0
337
Member Avatar for ehpratah

Hi need some insight on how to show record from different database on the same server. i also tried using join but didnt get the correct output. im finding a way to make it work using just one query. my last resort will be using different query to select the …

Databases mysql
Member Avatar for ehpratah
0
344
Member Avatar for grant.baker

Ok, what I'm trying to do is have next and prev buttons to navigate through a mysql database sorted by date. Currently, the code I wrote does this, but gets stuck on duplicate dates. $Next = mysql_query("SELECT * FROM $logbook WHERE Date>='$Date' AND ID!='$ID' ORDER BY Date LIMIT 1"); $Prev …

Databases mysql php sql
Member Avatar for raybigto
0
3K
Member Avatar for kaye.santos.92

i have a datagridview and a combobox. the combobox is auto populated by values from a database. i need to filter the datagridview using combobox. this is the code that i've done. it shows a error : Cannot find column [year]. can you help me??? Imports MySql.Data.MySqlClient Public Class ReportGradeLevel …

Databases dataset mysql
Member Avatar for kaye.santos.92
0
370
Member Avatar for Dani

So I currently am trying to insert a row into a MEMORY table but only if the primary key doesn't already exist. I'm using INSERT IGNORE but I was reading, much to my surprise, that INSERT IGNORE is actually slower than INSERT ... ON DUPLICATE KEY, but that letting the …

Databases mysql
Member Avatar for pritaeas
0
431
Member Avatar for dipakatcvrca

Hi All, While going through my project work, I just came across a situation, where I needed to alter my table. I needed to add a column at the beginning of the table, i.e. the first column of the table. We have syntax for appending a column to a table …

Databases mysql
Member Avatar for faucon
0
5K
Member Avatar for Nurul_2

Hello. I need some help to update two table.. This is my coding: $query = "UPDATE br.discharged_Date, b.book_Status SET br.patron_ID = b.patron_ID FROM borrow br INNER JOIN book b ON br.patron_ID = b.patron_ID WHERE b.patron_ID = '$patron_ID'";

Databases mysql
Member Avatar for kamini_1
0
181
Member Avatar for come_again

hello everyone, I am having some difficulty setting up a connection to my database. I created one on godaddy but am unable to get past this one hump: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)' in /home/badinvestor/public_html/config/connection.php:9 Stack trace: #0 …

Databases php sql
Member Avatar for come_again
0
668
Member Avatar for gregarion

Hello All, I am facing a problem coming up with a SQL query for a certain issue: Table 1 ------------------- Client ID|Name of Client|Customer Type|Account Type| 01| A | AB | 30 | 02| B | AB | 30 | 03| C | CD | 30 | 04| D | …

Databases mysql sql
Member Avatar for gregarion
0
206
Member Avatar for gajen007

Gentlemen, I have a problem in entering a "DATE" in to MySQL table via a Java SWING interface. I used 'jdatepicker' to select a date & I use XAMPP server for MySQL database. Earlier I converted the selected date in to String values & feed as VARCHAR in mysql table. …

Databases java-swing mysql
0
107
Member Avatar for Santanu.Das

I am new in MySQL. I do not about model and how can I store data in the tables created in amodel.

Databases mysql
Member Avatar for Santanu.Das
0
125
Member Avatar for Santanu.Das
Member Avatar for cereal
0
121
Member Avatar for Szabi Zsoldos

Hi guys, Trying to develop a custom facet like search in Mysql. I have 3 tables for this: 1.Attribute class 2.Attribute class Name 3.Attribute class Value - attributeClassName Id - productId 4.Products Each product has one attribute class Each attribute class has many values Each value is contained in a …

Databases mysql
Member Avatar for Szabi Zsoldos
0
207
Member Avatar for musab.hussain.7

Hello Guys ..I have a question : I have two tables employees and department .. employees table have forign key to depatment dept_id (pk) .. i want to know which deapartment has maximum number of employees ... i have done little , but it give number of employees in each …

Databases
Member Avatar for diafol
0
109
Member Avatar for christ123

Hi there! I have a problem and i want you guys to help me. I have 1 table which has many fields. (mysql and im connected from microsoft visual studio..runs very well so there no problem with this). lets forget the fields that we dont want now.. i have 4 …

Databases php sql visual-studio
Member Avatar for christ123
0
226
Member Avatar for Santanu Das

I use SQL Server2008 R2. From yesterday, I get a problem to open it. When I try to open it by Microsoft SQL Server Management Studio an error is occurring. And I also get the same error when I call it from vb.Net2010. I am attaching here the error picture. …

Databases mssql sql
Member Avatar for Santanu Das
0
172
Member Avatar for Priti_P

Hello, In my database schema, for one fiels "exp" i have made it as float(3,2) it stores value properly up to 9.99 but for then it goes out of range and stores 9.99 how?? whats wrong in this? i expect it store values up to 999.99 but it stores uo …

Databases mysql
Member Avatar for Priti_P
1
165
Member Avatar for JOSheaIV

Alright, so the following has stumpted me and a few others in the office, and we just can't figure it out. I have develope a program that allows us to go out to a specific database and search one of the fields based on specified values. Now that seems all …

Databases regex seo sql
Member Avatar for diafol
0
5K
Member Avatar for davy_yg

Column 'group_id' in where clause is ambiguous. I wonder why? invoice.php <?php //LOAD GROUP $result2 = mysql_query("SELECT group_name FROM `group` INNER JOIN invoice ON `group`.group_id = `invoice`.group_id WHERE group_id = '".$_GET['group_id']."' ORDER BY group_date") or die(mysql_error()); $result = mysql_query("SELECT * FROM `invoice` WHERE group_id = '".$_GET['group_id']."' ORDER BY group_date ASC") …

Databases mysql
Member Avatar for Adrian_5
0
566
Member Avatar for ankit1122

hello i have seen that tables are locked in mysql while reading the same table..so should i continue using mysql in my website...

Databases mysql
Member Avatar for steelbrain
0
285
Member Avatar for James_30

Can someone recommend a book or some reference to properly code DAO`s and apache derby client driver. The derby manual did mot cover this I will display my code in my next post

Databases apache
0
96
Member Avatar for bolfescu

I have this sqlqry, icarrelli have the value 0 and the q2 value 64(sum) why the result is 64 and not -64? <?php $result = mysql_query("SELECT *,iCarrelli-SUM(q2) as total9 FROM articles,inc"); $row= mysql_fetch_assoc($result); echo "" . $row['total9'] . ""; ?>

Databases mysql
Member Avatar for pritaeas
0
93
Member Avatar for bolfescu

hy, unfor its not showing nothing...what it is wrong...? <?php include('config.php'); error_reporting(0); ?> <table border=1> <tr> <td rowspan="3">Ditta</td> <td colspan="6">mandatori riceve</td> <td colspan="6">mandatori consegna</td> <td colspan="6">saldo</td> </tr> <tr> <td colspan="3">carelli</td> <td colspan="3"></td> <td colspan="3">carelli</td> <td colspan="3"></td> <td colspan="3">carelli</td> <td colspan="3"></td> </tr> <tr> <td>carrelli con piastra luc.rosso</td> <td>carrelli con piastra luc.nero</td> …

Databases mysql sql
0
77
Member Avatar for SimonIoa

When i copy a text and upload it the output looks like that PROLOGUE\n\n\nIF you leave the city by the Porta Maggiore and take the Via\nPrænestina, which leads east into the Sabine hills, at some thirty-six\nkilometers i want to replace \n with a line break i use this `UPDATE messages …

Databases
Member Avatar for steelbrain
0
408
Member Avatar for bolfescu

Hy i have this table, unfort i dont know how to retrieve the data from sql and to put it one under each one i have all the 18 tablesi whant to do something like this: (id1) 2 3 4 5 6 7 8 ..... (id2) 2 3 4 5 …

Databases mysql sql
Member Avatar for bolfescu
0
149
Member Avatar for gbhs

Hi if myTable has a column like Col 10 7 3 5 9 4 How can I select three smallest numbers? my resultset should be 3 4 5 I don't prefer the following; with myT as (select col from myTable order by col) select top(3) from myT Any better idea? …

Databases mssql
Member Avatar for gbhs
0
251
Member Avatar for come_again

Hello everyone, I am putting together a project where people are able to upload multiple choice questions to a larger database and then create tests from them. I have several questions (and I apologize for the length of this post) about what is the best way to go about doing …

Databases open-source sql storage
Member Avatar for diafol
0
221
Member Avatar for James_30

I have a JDesktop app using apache derby embedded db. Without totally rewriting the app can it have the same db but on a server?

Databases apache
Member Avatar for James_30
0
143
Member Avatar for James_30

I intend to build the web app using a database on a server. I have tomcat running. I am. Working on creating the server on eclipse (mars). I was planning on working with MySQL. What additional set up do I have to do to work with this db in my …

Databases mysql
Member Avatar for James_30
0
244
Member Avatar for minitauros

For some reason my triggers are recursing, while I think they shouldn't. I'll simplify the examples for the sake of you not having to read through all the code. Trigger 1: CREATE TRIGGER table_1_after_delete AFTER DELETE ON table_1 FOR EACH ROW BEGIN DELETE FROM table2 WHERE table2.table_1_key = OLD.table_1_key; END …

Databases mysql
Member Avatar for minitauros
0
1K
Member Avatar for Mike_H

I am trying to update the field id_key which is an unique value using uniqid() function. When I print to the screen the value for uniqid() [$id] is different for each record. Which is correct and is what I want. However when I go inspect the table all the values …

Databases mysql
Member Avatar for Mike_H
0
196
Member Avatar for lk123456

Hi, WebSQL has been deprecated but it is still useful for some applications at this time. How would I update a row of data saved into WebSQL, when using a foreach KnockoutJS binding? <table class='producttable'> 2. <tr> 3. <th>Name</th> 4. <th>Description</th> 5. <th>Price</th> 6. </tr> 7. <tbody data-bind="foreach: products"> 8. …

Databases
Member Avatar for lk123456
1
829
Member Avatar for Mike Bishop

I am trying to calculate days between two dates so that I can find out if they fall in the 30 / 60 / 90 day bracket The calculation I am using is working fine ` DATEDIFF(day, dbo.TblReturnDetails.RcvdDate, { fn NOW() })` what I am trying to do now is …

Databases mssql
Member Avatar for Mike Bishop
0
241
Member Avatar for bolfescu

Hy i have a db with 1 collum(with 20rows) i whant to create a custom table view of this database with the sum at the end of the table but with custom search function, i cand find an script to do this for me? Thanks

Databases mysql
Member Avatar for AndrisP
0
201
Member Avatar for Maideen

Hi I have database in structure like below Newspaper State1 state2 state3 state4 ABC 1000 5684 5687 246 DEF 879 2547 2578 2357 But I need to the structure like below How can i change this Newspaper State copies ABC State1 1000 ABC State2 5684 ABC State3 5687 ABC State4 …

Databases mssql
Member Avatar for kgariando
0
313
Member Avatar for ravi_14

the relation betwwen student and course entity is many to many.but it is not recommended .how can we convert it to two one to many relationships?

Member Avatar for hericles
0
144
Member Avatar for bolfescu

Hy i have two tables articles and iniziale, articles have a collum c2,and iniziale have c1 i whant to do like this c1(whic its have one value only)- sum(c2)(entire collum) ive tryied like this but nothing...:( <?php $result = mysql_query("SELECT *,SUM(iCarl)-SUM(CarrelliCC22) as total2 from articles,iniziale"); $row= mysql_fetch_assoc($result); echo "<h4>" . …

Databases mysql
Member Avatar for bolfescu
0
196
Member Avatar for davy_yg

studentmgt.php $search = $_GET['search']; echo $search; ?> <div align="center"> <div style="width:700px;text-align:left;padding-top:5px;"> <?php if (isset($confirmation)) { echo $confirmation; } ?> <form method="get" action="<?php $_SERVER['PHP_SELF'] ?>"> <br/> <?php //LOAD STUDENTS INFO $result = mysql_query("SELECT * FROM `student` INNER JOIN `group` ON group.group_id = student.group_id INNER JOIN `access` ON access.access_level_id = student.access_level_id ORDER …

Databases mysql sql
Member Avatar for pritaeas
0
173
Member Avatar for bolfescu

Hy io have this php script(if you can call php script) anyway i whant that every result to show it one down the another(mysql grid table) but with that kind of search....i've tryied but unf nothing.... this is the "code" <?php $i = 0; if ($_REQUEST["string"]<>'') { $search_string = " …

Databases mysql
Member Avatar for pritaeas
0
201
Member Avatar for hxinen

Hi, I need some help with my college work, with the database I am designing. # Assuming I want this to happen: # **Main Category:** Level1 Level1 >Level1.1 >Level1.2 >>Level1.2.a >>Level1.2.b >>>Level1.2.b.a >>Level1.2.b.a.a >>>Level1.2.b.b How do I design this? Thank you!

Member Avatar for scarcella
0
3K
Member Avatar for terryds

This is my query : CREATE TABLE userrole ( userid BIGINT NOT NULL, roleid INT NOT NULL, PRIMARY KEY(userid,roleid), CONSTRAINT fk_userid FOREIGN KEY (userid) REFERENCES user(user_id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT fk_roleid FOREIGN KEY (roleid) REFERENCES role(role_id) ON DELETE CASCADE ON UPDATE CASCADE ) So, what i want …

Databases mysql
Member Avatar for cereal
0
269
Member Avatar for radostin.angelov.370

I have a table with highschools in different cities. I want to give the user the option to choose a certain city and view the schools there, or view all schools. This is my original query: SELECT * FROM highschools WHERE city = '$givenCity' I need to compare 'city' to …

Databases mysql
Member Avatar for hericles
0
200
Member Avatar for otengkwaku

Hi guys i have a table with this data ______________ | site | cat | ______________ | my | sp | | my | sp | | my | cc | | my | cc | | yo | sp | | yo | sp | | yo | cc …

Databases mysql sql sqlite
Member Avatar for otengkwaku
0
221
Member Avatar for divyakrishnan

Hi.. I want to call mysql Stored procedure with OUT parameter. Its worked in phpamyadmin But in php it returning empty result. I have used the following php script. Can anyone help me? <?php include("dbcon.php"); $countryname="india"; $rs1 = mysql_query( 'CALL countCountry($countryname,@totalcount)' ); $rs = mysql_query( 'SELECT @totalcount as totalcount' ); …

Databases mysql
Member Avatar for divyakrishnan
0
4K
Member Avatar for Sizwe_1

i have the following sql query i seem to be having this error "Incorrect syntax near the keyword 'INSERT'"

Databases mysql
Member Avatar for Sizwe_1
0
214
Member Avatar for Tinnin

Hi All, I'm not sure if this is a technical issue, preference or a question about best form. I have a 'users' table and a 'contacts' table. 'users' and 'contacts' have no direct relation. Both contain an email address for each record in their own table. I want to send …

Databases mysql
Member Avatar for Tinnin
0
354
Member Avatar for AvinashW

dept (dept_no, dname, loc, mgrcode) emp (emp_no, ename, designation) project (proj_no, proj_name, status) dept. and emp. are related as 1 to many. Project and emp are related as 1 to many. i) Give the names of employees who are working on ‘Blood Bank’ project.`Inline Code Example Here`

Databases mysql
Member Avatar for AvinashW
0
150
Member Avatar for safi.najjar1

hello guys i am trying to do something wierd in my query here is my query SELECT * FROM products INNER JOIN smartdevices ON products.id = smartdevices.productId WHERE products.clearName LIKE :keyword1 OR products.clearName LIKE :keyword2 OR products.clearName LIKE :keyword3 when the user enter the search phrase my php code will …

Databases mysql
Member Avatar for safi.najjar1
0
144
Member Avatar for safi.najjar1

Hi guys, I have 3 classes : 1.Product(Super Class) 2.SmartDevice(Sub Class) 3.Accessories(Sub Class) so I made 3 tables in database and made productId as a foreign key for smartDevice table and accessories table so I've had a trouble thinking about what the code of CRUD will be if I used …

Databases mysql
Member Avatar for safi.najjar1
0
354
Member Avatar for nadiam

hey guys. I've always had problems when it comes to getting data from multiple tables in a database and so now I have another one. I want to get data from 3 different tables: contact1, child1 and spouse1. columns in contact1 where i want to get data from: contact_id | …

Databases mysql
Member Avatar for nadiam
0
308

The End.