I have some PHP code which stores whatever is typed in a textbox in the databse. If I type in bob's apples, it gets stored in the database as bob's apples.
What can be the problem?
The table storing this has the collation of latin1_swedish_ci.
Hui folks,
I need to be able to store numbers like 3.5 in my table. So I've used the decimal type field. But if I enter 3.5 it round it up to 4. Am I being stupid or is it not the point of decimal to have a decimal point?
Thanks,
Jonesy
Hey Everyone,
I just started using TCPDF (output with HTML), and I do not understand why I can not have an inline CSS style for border like the following,
style="border-right: 1px"
After looking at some of the examples, the only place I see borders being used is on a table using the border="1" property. This is very frustrating, and I hope there is a way for me to use all inline CSS instead of old HTML attributes like "border".
Thanks for any help, Metropolis
I am working on a Incoming and outgoing messages webform, I would like to show the users the only messages in their INBOX of one day behind. I have a dropdown where I'm giving the selection of All and Pending messages. But if the users have any pending messages in INBOX of just one day behind ,they have to choose All to retrieve the messages.
So how do I retrieve messages from message table of just one day behind ? I am using SQL 2000 vb.net web application.
Hello everybody I have created a table layout manager by extending a manager. Every thing is working fine but when I tried to create and set rounded border by using BorderFactory it is actually displaying a square instead of rounded square, please help me by send your valuable suggestions. Even though I have tried to add that border to a custom label field that also behave in a same manner.
I have two firebird databases running on the same server and I want to write to a table on one of the databases from a trigger on the other database when certain actions occur. I have had a search and cannot find out if this is possible.
Can it be done either natively in firebird or via a UDF?
Thanks
Neil
I don't know the real name of that application but what i want to do is so simple, i have an oracle database with more than 50 tables. I want to get their names also their field names, so i thought that it would be nice to use a designer or something like mssql has. Then i can get the field names and table names easily. How can i do that?
Thanks for the help,
Mehmet Serif Tozlu
In MySQL, you can use \G to run a query:
select * from mytable\G
And your results will be displayed in an inverted table, kinda like this:
*************************** 1. row ***************************
column1: 12345
another_colum: another value
yet_another: ABCD
*************************** 2. row ***************************
column1: 238479
another_colum: another value again
yet_another: WXYZ
Is there any way to get a similar format using Oracle / sqlplus?
hi guys,
I have variable @count of datatype int.I am setting values to this @count.
I want to select top @count number of rows from table.When i use Select top @count,its showing error.
Delete from ItemDetails where GroupId in (Select Top @count Id from ItemDetails where GroupId=@Prm_GroupId )
The error is Incorrect syntax near '@count'.Can anybody help?
Hello,
I'm trying to build a facebook like search for my software.
I'd like to query the table customers.
I've set up a FULLTEXT Index and tried the next query
SELECT * FROM Customer where CONTAINS(*,'*ann*')
The query does return all the customers named Ann, but it doesn't return all the customers name Anne.
Is there a way to create prefix search on SQL SERVER 2008 using FTS?
Thanks.
I'm trying to sort a GLibc hash table by id that looks something like:
key - id
{
"Red", 2,
"BLue", 4,
"Yellow", 5,
"Orange", 8
}
I'm just not sure how to approach this because GLibc does not have a sort method. I was thinking to use qsort or GCompareFunc
Any ideas will be appreciate it!
How can we generate a link that can be clicked on by 5 different people on a Social Network game, so that each of the five people can get a bonus? The link will be published as a "newsfeed" on the Social Network such as Facebook.
The link shouldn't be easily "generated" by any people as a cheating method.
Also, what database table(s) should be added to handle:
1) the bonus can be claimed up to 5 times
2) must be claimed by different people
?
Hi,
I have an ExpenseType object that I have created with the following migration:
class CreateExpenseTypes < ActiveRecord::Migration
def self.up
create_table :expense_types do |t|
t.column :name, :string, :null => false
t.timestamps
end
end
I can see the table name is the pluralised expense_types. My question is, how do I reference this type in a belongs_to relationship?
Is it:
belongs_to :expensetype
or is it
belongs_to :expense_type
I do not seem able to set it up correctly.
Cheers
I would like to search between to columns in a s query or a table depending on the variable on a paramenter e.g
Declare @SelectAll as interger
Set @SelectAll = 1
Declare @Column as interger
Select mt.Column1, mtColumn2
From MyTable as mt
Where Case When @SelectAll = 1 Then
mt.Column1 IN(@Column) and mt.Column2 (' Selecting all")
When @SelectAll = 1 Then
mt.Column2 IN(@Column) and mt.Column1 (' Selecting all")
End
The purpose of this query is to allow the user to search between the column they choose. Further more the use of parameter is for the purposes of writing reporting services reports.
I have two tables posts and comments. Table comments have post_id attribute. I need to get all posts with type "open", for which there are no comments with type "good" and created date MAY 1.
Is it optimal to use such SQL-query:
SELECT posts.* FROM posts
WHERE NOT EXISTS (
SELECT comments.id FROM comments WHERE comments.post_id = posts.id
AND comments.comment_type = 'good' AND
comments.created_at BETWEEN '2010-05-01 00:00:00' AND '2010-05-01 23:59:59')
I'm not sure that NOT EXISTS is perfect construction in this situation.
I have a table with the following columns:
id, teamA_id, teamB_id
Will it be possible to write a SELECT statement that gives both teamA_id and teamB_id in the same column?
EDIT:
Consider this example
From
id, teamA_id, teamB_id
1, 21, 45
2, 34, 67
I need
Teams
21
45
34
67
For Eg...if the User needs to retrieve the 10th highest mark in a "mark" column.
The column may be in any order. I need Query for to get stud_name of 10th highest mark.
Say for eg..table name is student
columns are id, name, mark.
How to select top n rows from a datatable/dataview in asp.net.currently I am using the following code by passing the table and number of rows to get the records but is there a better way.
public DataTable SelectTopDataRow(DataTable dt, int count)
{
DataTable dtn = dt.Clone();
for (int i = 0; i < count; i++)
{
dtn.ImportRow(dt.Rows[i]);
}
return dtn;
}
SELECT h11, HA11
FROM florin.h11
WHERE (3>d1 AND 3<d2) OR (3>d1 AND 3=d2 AND id=MAX(id))
UNION (3=d1 AND 3<d2 AND id=MIN(id));`
Here a screenshot of my table stucture:
I have nearly 20 tables.I want to draw datamodel diagram for this table.But it take more time.Is it possible to draw the diagram using any datamodel software.My constraint is i give dataonly it draw the diagram automatically,please suggest any softwsre related to my constraints
I accidently changed the "host" value for the root user inside of the user table for mysql.
I need to change it back to localhost because I changed it to arancillary2125 (my other machines DNS name) but I cannot access mysql (from PHPMYADMIN or command prompt) due to "localhost" not having permissions anymore.
I am running windows XP // apache //
I have tried the following solutions but they didn't work:
http://serverfault.com/questions/92870/1130-host-localhost-is-not-allowed-to-connect-to-this-mysql-server
I have a table with card numbers and names. Some of those names are the same, meaning they have multiple cards. How can I select all the rows where the name occurs more than once?
In the database I'm working with, every table repeats the same nine columns and I don't want to have to supply the same properties in each of my entities to map these columns.
I've tried adding properties to a common base class and adding them to the sub class's mapping file, but this doesn't work. I've read the documentation around inheritance mapping but this did not help.
What is the best way to map columns that repeat accross multiple tables in NHibernate?
Hey,
I'm using OpenJPA as a JPA provider.
Is there a way in which I can recreate the database tables (When an entity changes) without dropping the entire data?
When an entity changes, I drop and create every table in the store, and obviously lose the data within. Is there a tool or product to keep the data somehow?
Thanks,
Udi