Hi i have a table with my message. With a query i get the values Namn(varchar(50 ) , Message(Text) , Sent(datetime) , Seen(bit)
The Namn , Message and sent i just want to write out and it works.
But with the seen i dont want to write true or false or 1 and 0. I want to change a image..
How does it work? I dont have a clue to where to begin.
Here is my code that works today.
...
User Profile
Collapse
-
Use a bit(Boolean) in a DataList
-
I don't think it is the code side that is the problem.
First.
Watch these 2 examples and i think you notice the problem and solution
I got a table called temp
Id (int) Date(datetime)
-----------------------------------------
1 2007-03-22 05:26:33
2 2007-03-22 05:26:40
3 2007-03-22 05:26:47
that are added by the funktion NOW()... -
-
Giving values to multible Varibles with SET and SELECT
Hi my problem is real simple. I want to give 2 Varibles values from one SELECT query
Here a exampel.
Code:DECLARE @test1 int , @test2 int; SET @test1=SELECT a FROM Table_T SET @test2=SELECT b FROM Table_T
Code:DECLARE @test1 int , @test2 int; SET @test1 , @test2=SELECT a , b FROM Table_T
-
I am at work so i dont't got any prog to test the query but i think it should be something like this.
SELECT tblUsers.userna me, Count(tblUsers_ F.fromid),Count (tblUsers_T.toi d),Count(tblUse rs_F.unread),Co unt(tblUsers_T. unread) FROM tblUsers INNER JOIN tblMessages ON tblMessages.fro mid=tblUsers.us erid As tblUsers_F
INNER JOIN tblMessages ON tblMessages.toi d=tblUsers.user id As tblUsers_T
(Not the best way...Leave a comment:
-
hard to say best way to do it.. With that little info i would say. Save all values in a textfile with a char to seperate them. example
Game1.sav
5#123#Hunter#5. 44434#2#3#1#1
Then just read and fill the varibles.
to prevent cheating you can crypt the file while writing. Then de-crypt it on loadingLeave a comment:
-
Here is some code so that you see that basic and have some search words
Code:struct Point3D { public float m_x; public float m_y; public float m_z; public string name; public float [] GetArray() { float [] arr = new float[3]; arr[0] = m_x; arr[1] = m_y; arr[2] = m_z; return arr; } }
Leave a comment:
-
Datetime output diffrent in C# and MSSQL
Hi I have a little problem
If I use the this C# code
Code:DateTime.Now.ToString()
But if i use this code in MSSQL
Code:(CONVERT(VARCHAR(35), { fn NOW() }))
How do I do to get " 2006-11-03 06:15:17 " instead of " Nov 3 2006 6:15AM " with MSSQL
Not a big problem exept the chat looks very strange when... -
Updating a larger site how does it work?
I will soon publish my first "big" site. it uses a couple of pages and a database with about 25 tables. Then a thing hit me.
Say that i publish the site. Users do changes in tables like insert, update delete..
Then i want to realese version 2.
I want to change some pages code. maby some tables. But still i cant erase all user info.
How do you do that in best way?
... -
Dont know if this helps you but this is 2 diffrent ways to do the same thing
We have a TABLE called tbl_books
with two columns
bookname & author
We want to see all books the author that wrote Lord of the Rings have published
Code:SELECT bookname FROM tbl_books WHERE (author = (SELECT author
Leave a comment:
-
What do you meen? in a label? the day it is today? or just like a varible? or just as plain html...Leave a comment:
-
It could be that the site have to update before you see the changes.
test to click one time the refresh the site.Leave a comment:
-
Dont realy understand what you want..
What syntax are you writing in
Splitting up money could be done with a code like this (dont know if it is the best way
Code:int money=1234; int fifties, twenties, tens; fifties= Convert.ToInt32(Math.Floor((money/ 50))); money= money- fifties* 50; twenties=
Leave a comment:
-
Simple beginners question about stored procedures
Hi
I have made my first Stored procedure and want to use it in a update command.
This is my update command
Code:UPDATE TEMPCHAR SET HP = TEMPCHAR.HP + 5 FROM TEMPCHAR
This code works
Code:DECLARE @returnstatus
-
I am not sure
But it could be this
"Insert INTO Customer (FirstName), VALUES cstr(txtcustome rname.text)"
is not a proper SQL query.
is txtcustomername a textbox?
then the row
updatecustomerd atabase("Insert INTO Customer (FirstName), VALUES cstr(txtcustome rname.text)")
should be change to
updatecustomerd atabase("Insert INTO Customer...Leave a comment:
-
-
Adding text to a text column
Hi
I want to have a log so in my table i got a TEXT field called LOGG. I want to update this field with new data by adding more text to field.
I am using MS SQL
'test' + 'test' doesn't work . say you cant add 2 text to each other
concat('test',' test') doesn't work . say that CONCAT isn't a built in function
this code works but is it really the best way to do?... -
You meen in the code
Code:Button1.Visible = false;
To show it again you do same thing just change false to trueLeave a comment:
-
Thanks..
Worked perfekt.
I understand the syntax. Havn't seen the command "id not in" before.
Thanks again...Leave a comment:
-
Need help with SELECT Query. dont know what topic
I have 4 tabels
tbOWNERS // PLAYERS
ID , NAME
1 Mike
2 Rambo
3 Sam
tbCARS // CARS THAT EXIST AND WHO OWNS THEM
ID , CAR , OWNER
1 Honda 1
2 Honda 3
3 Volvo 1
4 Volvo 2
5 Saab 1
6 Saab 2
7 Saab 3
tbTRACKS // DIFFRENT RACES THAT PLAYER CAN JOIN...
No activity results to display
Show More
Leave a comment: