2,569 Topics
![]() | |
Hi, I am looking for the best solution to my situation: - I have businesses listed in a MySQL table. - Each business can bid on up to 10 keywords (different prices for different keywords). A user inputs a keyword and then I must find a way to query my … | |
Running a SQL query from the following code: [CODE] <php if(sizeof($_POST['addcandidate'])){ foreach($_POST['addcandidate'] as $id){ $name= mysql_query("SELECT LastName FROM candidate WHERE Candidate_ID= '$id'"); while($rowz= mysql_fetch_assoc($name)){ $candidatename= $rowz['LastName']; $alter= "ALTER TABLE '$votertable' ADD '$candidatename' int"; mysql_query($alter) or die(mysql_error()); } } } ?> [/CODE] I return Im getting: [COLOR="Red"]#1064 - You have an … | |
Hi. I have the next problem: 1. I'm doing a select in a DB table and I'm displaying the result on a page 2. because one of this field is a comment and is too long, I display only the beginning of this folowed by "Read all" as a link. … | |
Hi, In my database table I have a column which has all the properties of a class. And While reading from the table I need to get the values of the properties.I have to get the value on a label.But obviously [code] lblTest.Text=reader["Description"].ToString(); [/code] wont work. As I need to … | |
Hello.. I am making a program where i use an sql database to storage user information, but i cant figure out how to add a new record that actually stays in the database, i have found some different codes but they only add the record "locally", so when i close … | |
Team - Could someone please tell me I haven't lost my mind? I have done relationships in the past but now they don't seem to work. Have I gone dumb? Creating a winform, using VS2008, sqlexpress & vb.net. My dataset looks like this: -------------------------------------------- Table 1 - BranchInformation BranchID - … | |
[CODE] int[][] jaggedArray = (from line in File.ReadAllLines(fileName).Skip(1) select (from item in line.Split('\t').Skip(1) select int.Parse(item)).ToArray()).ToArray(); [/CODE] This is a crazy example. It was sparked by what is probably a homework thread on another forum here, but it is basically reading in a tab-delimitted text file, stripping out the first row … | |
I need to display all the comments from the comments database table where the $msg_id_fk = $msg_id from the messages table and I need it in a while loop [CODE] $comment_results = mysql_query("SELECT * FROM comments WHERE msg_id_fk='$msg_id' ORDER BY com_id ASC"); while ($row = mysql_fetch_array($comment_results)){ $msg_id_fk=$row['msg_id_fk']; $comment=$row['comment']; } $message_results … | |
Hello Everyone, I have developed an application for website using ASP.NET and SQL Server 2005. Recently I have uploaded it to server, but after uploading its showing the following error message - [B] Login failed for user ''. The user is not associated with a trusted SQL Server connection.[/B] [B]Description:[/B] … | |
Hey all, Im creating a voting website using PHP & SQL. Im planning on using a single table to store votes. Something like this. -- Voter_ID -- Candidate A-- Candidate B -- Candidate C -- ### --- 1 --- 2 --- 3 ### --- 1 --- 3 --- 2 ### … | |
I Got 2 tables: 'Standby' and 'Usage' [COLOR="Red"]Standby[/COLOR] Table got this fields: [COLOR="Red"]PartNº[/COLOR] (equipment id); [COLOR="Red"]Area [/COLOR](physical location); [COLOR="Red"]Stock1[/COLOR] (Nº Total of equipments); [COLOR="Red"]Usage[/COLOR] table got this fields: [COLOR="Red"]Quant_Used[/COLOR] (The times that the equipement is taken from Standby); [COLOR="Red"]Quant_Received[/COLOR] (The times that the equipement is restored to Standby); [COLOR="Red"]PartNº[/COLOR] (foreign … | |
[code] Dim da2 As OleDb.OleDbDataAdapter Dim cols As Integer = Attendance_QueryDataGridView.ColumnCount Dim rows As Integer = Attendance_QueryDataGridView.Rows.Count Dim a(cols) As String Dim dt As New DataTable("Attendance") da2 = New OleDb.OleDbDataAdapter(sql, con) da2.Fill(ProjectDataSet, "Attendance") Dim NewRow As DataRow NewRow = ProjectDataSet.Tables("Attendance").NewRow For z = 0 To cols - 1 a(z) = … | |
Just when I thought I was comfortable with SQL queries, another one popped up that I can't get around with.... I'm ALMOST there but not quite. Here is the situation... I'm dealing with two tables [B]PoolTeams[/B] and [B]PlayerStats[/B] The PoolTeams table has two columns: [B]PoolTeamID[/B] and [B]TeamName[/B] The PlayerStats table … | |
I have a table in Access with multiple foreign key fields. I would like to populate this table from Excel with SQL. Hardcoding values works fine: [CODE]INSERT INTO Table ( Field1, Field2,...) VALUES (x,y,...)[/CODE] Nesting SELECT statements like this fails: [CODE]INSERT INTO Table ( Field1, Field2,...) VALUES ( (SELECT f_key_x … | |
![]() | Anybody know how to do the following: id (PK/autoincrement) file_id (FK/int) - same file id pops up loads of times statement (varchar) - just some text from the file status (tinyint 0/1/2) - depending on the statement = 0 or 1 or 2 into a single record for each file_id, … ![]() |
I am writting a query in SQL Developer. I have a field in the table that holds a timezone. I need to set the query to use that timezone. Any ideas? Here's the query I have so far: [CODE]select to_char(dateoftransport, 'MM-DD-YYYY') as "Date", dispatch_id as "Dispatch, vehicletype as "Dispatch Type" … | |
Hi Everyone, I'm having some issues in the construction of an algorithm for a project. This is just a fraction of the algorithm and my problem is this: I'm trying to build a PHP function that gets the values of the first and second rows of a table and subtract … ![]() | |
Hi, Currently I have two colomns as frm_date and to_date. I need to display two dates in a one column as frm_date - to_date. eg: 2007-01-01 - 2009-01-01. Is there any functon to do this? Thanks in advance!! | |
I'm not quite sure how to do this join: Table1: Products -------------------------- Prod_ID | Prod_Name | etc Table2: Images --------------------------- IMG_ID | Prod Name | Prod_ID | [CODE] Select Prod_ID, Count(i_Prod_ID) from tblImages right join tblProducts on tblProducts.Prod_ID = tblImage.i_Prod_ID [/CODE] Does not produce what I need..... The desired end … | |
Hi. I've made a record on a table which would be used as a comparison to other records in the table. for example.. table: recordID 100001,Company Name recordDI 999999,Company Name i want to compare record 1000001's Company Name with record 9999999's Company name. How do I do that? thanks! | |
I am trying to get 'SERVERPROPERTY ('edition') using ADODB. I have a connection to a database but I keep getting Error 80040e14 and unexpected token SERVERPROPERTY was found following BEGIN-OF-STATEMENT. Any ideas how to fix this. Thanks Joey | |
Im trying to create a report that only includes records that was created between to [B]Date Variables[/B], [B]dateTo[/B] and [B]dateFrom[/B]. There are three combo boxes used to get the values for the two dates. Here's the code I didn't include the select case for the month(in string) to be converted … | |
I want to combine the following select statements so I can have 1 export file rather than 2. This code selects student information along with their HomeRoom teacher. [code]SELECT students.last_name, students.first_name, students.grade_level, teachers.last_name, students.student_number FROM students JOIN CC ON students.id = cc.studentid JOIN teachers ON teachers.id = cc.teacherid WHERE (cc.course_number … | |
Hi guys; I need your assistance. I am extracting some info from my database and I need difference between two fields of money values. Lets call the fields as Field1,Field2,& Field3. Field1 = Current Balance Field2 = Starting Balance Field3 = Field1 - Field2 From my query, I get Field3 … | |
Hello all, I'm pretty new to PHP & SQL. I am having some trouble with a web voting page I'm creating. I have a PHP loop which is displaying data from SQL table A. Beside it, a small text box linked to SQL table B to allow users assign numeric … ![]() | |
OK...guys... I'm about to have a cow here. It sounds real simple but I just can't seem to get it. Here is the deal: I have a normalized database made up of four tables (Primary Key in bold) Player ([B]PlayerID[/B], PlayerName) NHLTeam ([B]NHLTeamID[/B], PoolTeamName) PoolTeam ([B]PoolTeamID[/B], PoolTeamName) PlayerStats (PlayerID, NHLTeamID, … | |
Hi All, Is it possible to take Backup of SQL Server Compact database (i.e. *.sdf) and Restore the same. Regards. | |
I'm working on a Java program that is calling sqlcmd. It works perfectly on a computer with SQL server installed, but not at all on a computer that doesn't. I want to include the necessary exe and dll files to run this command in my jar. Anyone know which ones … | |
Hi All, I have a table in mysql in which there is a column which have following kind of data $Category=>Income;$NAV=>10.2181;$Repurchase;Price=>0;$Sale;Price=>0;$Date=>26-Feb-2008; I want to Bifurcate the data in that column into 5 separate columns in the same table in this way $Category=>Income in this thing "Income" in column "category". $NAV=>10.2181 … | |
Hi All, We want to create a c#/VC++ application by using which we should be able to create sql server database SNAPSHOTs in our own file format (in online manner). And later we should be able to get data from those snapshots files in offline manner using our application ( … | |
Hi All, Is there any way to convert the Sql Server 'Snapshot' files (*.ss files) to some other format...like 'xml','xls' or 'txt'...etc. Thanks. | |
i m using sql 2000, vs 2003, asp.net, c# i want to create a serch for my web site i m doing using sql full text serch but the way i know is to show the result in a data grid . but i m looking a way to show … | |
hi, i m trying to run a query on an MSAccess table, but it does not give me any count but only 0. There are 3 null values which i should be getting but it does not give me the result. This query works perfectly in MSSql Server 2008. the … | |
Hi all, I have an assignment about analysing the Distributed Information System for a typical International Shipping Company such as Hapag-Lloyd, Sally Line UK etc. The assignment mentioned about some objects such as Ship, Container, Consignment, Port, Voyage, Client, Representative, Contract, Manifest log, also about Crane system, Crane controller, Cranes … | |
i m using sql 2000 and i have a table with 3 columns ( credit , debit, total) what i want to do is whenever a value is inserted to the credit column it should add that amount to the total column and whenever there is a debit value it … | |
Iam writing (or trying to write) a simple join query statement in Query Analyzer. As of right now Im getting the error message Ambiguous column name 'categoryID'. My Statement is ; [code=sql]Select categoryID, Max (StockPrice) as maxStockPrice, MIN(StockPrice) as minStockPrice, AVG(StockPrice) as avgStockPrice From Category, InventoryPart Where Category.CategoryID = InventoryPart.CategoryID;[/code] … | |
Hello. I have searched, and found database tool the [URL="http://www.powerdbtools.com"]PowerDBTools[/URL]. Who knows how can I convert my Access database to SQL 2008 with this tool? Thank you. | |
HI i am planning to create a SQL IDLE using asp.net and C# . in that i am going to implement 4 modules : 1) Student Login module 2) Student Teaching Module (like w3schools.com ) 3) Student Feedback module (personalized feedback ) 4) correction module Now my problem is that … | |
Hey, so I have a form and i want to break down the form into 2 sections when inserting into my database. I have made 2 tables to hold my values. this is my SQL statements. [CODE] $sql_insert1 = "INSERT INTO `agent_users` (`user_name`, `password`, `primary_email`, `secondary_email`, `join_date`, `last_accessed`, `activation_code`, `first_name`, … | |
OK, this may not be possible in SQL, but here goes. I'm writing an app that allows the end user to select a date range and filter by area code, but I want them to be able to select as many area codes as they want. My question is with … | |
i write the procedure for login in this user can give username or emailid for the login. this is my code.... please check is there any change is required for this [code=text] ALTER procedure [dbo].[users_login] (@username varchar(50),@password varchar(50), @emailid varchar(50),@ret int output) as begin select username,password,emailid from users where( username=@username … | |
Yesterday [URL="http://www.daniweb.com/blogs/entry3943.html"]I reported[/URL] how the security vendor Kaspersky had allegedly fallen victim to a SQL Injection attack, with the usa.kaspersky.com website hacked and plenty of data potentially exposed. I said that Kaspersky would no doubt make an official statement sooner rather than later, and it has. Unfortunately it is one … | |
![]() | Hello All, I apologize for what seems to be a simple thing to solve but I'm not sure why I can't get the correct result below. Here is the code and the problem: I'm using .HTACCESS to password protect a directory. I'm taking the username and storing it in a … ![]() |
Hello everyone I have a problem using a "search" statement in mysql, using c#, here is my code: [CODE] private void btnBuscar_Click(object sender, EventArgs e) { SearchBook(txtBuscar.Text); } private void SearchBook(string bookID) { String connStr = "Server=localhost; Port=3306; Database=biblioteca;Uid=root;Pwd= -----;"; DataTable dt = new DataTable(); const string query = "SELECT … | |
Hello, I've wound up with a strange problem with my php script. The script goes into a SQL DB and checks the values of two different columns to see if they are equal. If the columns are not equal, then I store all of the possible values in column 1 … | |
Hey guys, I'm working on an SQLite3 wrapper using C programming. I was wondering if you know how can I set database properties such as mode, headers and echo through the C application. For example when running the SQLite shell and you are connected to the database you can do … | |
Hi I need to insert a flat text file into a SQL Server table using C#. The text file lines are 500 characters long and I will need to break it up into columns. Column 1 – 6chars, Column 2 – 1chars, Column 3 – 8chars I’ve managed to read … | |
Hi, I searched all over the net for a clear solution but what solutions i have found just leave me with more questions and answered. I have a multi step form using IF statements such as: [CODE] if(isset($_POST['2'])) { echo "step2 data"; }else if(isset($_POST['3'])) { echo "step3 data with text/ … | |
I purchased a book that included an evaluation version of 2008 enterprise. I had downloaded SQL 2005 express and had tried to download 2008 which said it succeeded and I was left with 2005. I checked the OS list of supported ones. XP professional is on the list. XP home … |
The End.