if(mysql_num_rows($result))
{
echo "no match found!";
}
it is throwing an error-
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\Hosting\6448289\html\includes\getQuestion.php on line 72
...
I am in the fairly initial stages of building an app which will hopefully be sold in the 1000's - more likely it'll be hundreds, but either way more than enough to cause a good sized headache for database schema changes.
I'm rather restricted to a windows / .net / sql server environment as a number of our customers will be self hosting ...
Hi,
I have a table Act in a medical database :
IDAct Historic IDPatient
1 2001-01-01 1
1 2001-01-02 1
2 2001-01-01 2
3 2001-01-03 1
I would like to compute the column IDActPerPatient:
IDAct Historic IDPatient IDActPerPatient
1 2001-01-02 1 1
2 2001-01-01 2 ...
How do delete duplicate records in a DB2 table? I want to be left with a single record for each group of dupes.
...
Hi there,
This is certainly a long shot, and is by no means vital to my development requirements, so if there's not a readily available solution the please note; I won't be too upset ;)
I was wondering if there was a way to see if a field value had been changed or updated within a date range in Access.
For example, I have a status fi...
What is the difference between in and any operators in sql ?
...
Hey hey!
I have a table with multiple columns and rows - from which I need to select the count of two specific columns which are not null.
In other words:
LoadID,StudyID,Data,Structure,Status,Progress,Error,FileType
Select the count of not null data and structure where LoadID= a number
I know I could do nested IFs, but I wonder if t...
In my Oracle database, I have a table called Customers. There are fields for name, zip, city etc., but there are also fields for invoicename, invoicezip and invoicecity. For some records the invoicespecific fields are not set, and in that case the invoice method should use the information from name, zip and city.
I use the following que...
Supposing my table has 10 columns .... which columns i have to choose to create an index ? Are there any guide rules to do that ? What are the disadvantages of indexes ? If i update column which is part of INDEX then what will happen ? Does it lowers the performance of INDEXES ?
...
Hi,
I need to use an Entity framework with my application, and I have used table - partitions in Oracle database. With simple JDBC, I am able to select data from a specific partition. But I don't know whether I can do the same with hibernate or Eclipse link (JPA). If someone knows how to do that, please do let me know.
usually the sel...
I have Database (compact sql server) in a *.sdf file.
I converted a compact framework project to a regular pc project and for some reason, with the same code, and the same *.sdf file the following exception was thrown:
"the file name is not valid. check the file name for the database"
the weird thing is that on my Pc - the substring "fi...
In SQL Server Management Studio, I want to execute a number of SQL scripts (saved queries) one after the other. This is simply to make it easier to run each. I could take each script and combine them all into one massive script and simply execute the lot, however I want it to all be separate so I can easily and simply run each bit by bit...
Hi,
I'm not sure how best to approach this - I think a pivot / unpivot should be used, but not sure how to make it work (as pivoting column is a non-numeric)
I have the following table (based on a query I can't modify):
CREATE TABLE #data
(donor_id NVARCHAR(50)
,last_gift DATETIME
,[2005] NVARCHAR(50)
,numgifts05 INT
,value_05 MONEY
,...
Working on an in-house ticketing system in php/mysql. This short term ticketing system has been in place for a year or so now.
We are reaching 10,000 tickets and I would like to make the queries more efficient, since 9,500 or so of the tickets do not need to be looked at each day.
Right now the queries are getting rows by tech id, the...
After doing DEFINE_EDITOR=vi . I wrote
SQL > edit sample.sql
This is being stored in Jagan/Documents by default. But i want this to be stored in Jagan/Documents/plsql. Can anybody tell how to do this..
...
Hi All,
I am trying to figure out the best way to handle a scenario where I will be passed XML that will contain criteria for a search. If the user has selected specific filters then those will be sent in the XML and if there is a section that they left unfiltered then it will not be present in the XML (Which would mean everything for ...
I've always been confused with when I should use the GO keyword after commands and whether a semi-colon is required at the end of commands.
When I run the Generate-script in sql server management studio, it seems to use GO all over the place, but not the semi-colon.
Please can someone explain to me the differences and why/when i should...
I'm doing some bulk migration of a large Oracle database. The first step of this involves renaming a whole load of tables as a preparation for dropping them later (but I need to keep the data in them around for now). Any foreign key constraints on them need to be dropped - they shouldn't be connected to the rest of the database at all. I...
Hi all,
I have a SQL Server view which does a simple join of two tables and returns some of the columns. Running this view in Management Studio does not cause any problems, the expected data (two rows) is returned.
When I use this view as data source for my TableAdapter in Visual Studio, I get a ConstraintException saying "Failed to en...
Hello,
I am messing up somewhere when writing a function to execute stored procedure. I think i don't have an idea how to execute SqlHelper.ExecuteReader. in SQL server 2005
This should return the state name. But i get it empty. Any idea, why??
Thanks in advance :)
reader = SqlHelper.ExecuteReader(DbConnString, System.Data.CommandTyp...