2,403 Solved Topics
Remove Filter ![]() | |
 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 | |
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 | |
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 … | |
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 … | |
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 | |
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 | |
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 | |
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 … | |
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 | … | |
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 | |
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 | |
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 ![]() | |
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 | |
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. … | |
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 | |
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 … ![]() | |
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 | |
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 | |
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 | |
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 | |
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> … | |
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 | |
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 | |
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 ![]() | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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? Databases database-design oracle sql | |
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 | |
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 … | |
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 | |
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! Databases database-design mysql | |
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 | |
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 | |
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 … | |
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 | |
i have the following sql query i seem to be having this error "Incorrect syntax near the keyword 'INSERT'" Databases mysql | |
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 | |
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 | |
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 | |
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 | |
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 |
The End.