Search found 5 matches
- Fri Mar 13, 2009 10:01 am
- Forum: Databases
- Topic: mssql convert sintax
- Replies: 0
- Views: 303
mssql convert sintax
I got these convert sintax: the date comes from a previous query(another mssql db). convert(datetime,'25-2-2009 0:00am',0) where is the error, can it be the date's format? is there a simple way to correct it? the error is: Warning: mssql_query() [function.mssql-query]: message: Line 5: Incorrect syn...
- Fri Mar 13, 2009 9:56 am
- Forum: Databases
- Topic: Syntax error converting datetime from character string. (sev
- Replies: 2
- Views: 333
Re: Syntax error converting datetime from character string. (sev
ok i've worked it out
- Fri Mar 13, 2009 9:13 am
- Forum: PHP - Code
- Topic: Displaying Results In A Table?
- Replies: 1
- Views: 139
Re: Displaying Results In A Table?
I think the following code can help you, check it out. $sql = "SELECT * FROM ID_Table WHERE Job_ID IN (SELECT Job_ID FROM Job_ID WHERE Job_ID ='1')"; $result = mysql_query($sql); $num_rows = mysql_num_rows($result);//counts the total results of the query $num_fields = mysql_num_fields($res...
- Fri Mar 13, 2009 8:36 am
- Forum: PHP - Code
- Topic: Separate year from date format
- Replies: 3
- Views: 251
Re: Separate year from date format
list($day,$month,$year) = explode("/",$date);
print $year;
print $year;
- Thu Mar 12, 2009 7:44 am
- Forum: Databases
- Topic: Syntax error converting datetime from character string. (sev
- Replies: 2
- Views: 333
Syntax error converting datetime from character string. (sev
i have 2 programs running mssql databases, i've wrote some functions to extract the data i need from each of the databases. when i'm trying to wirit some data to one of these db i get the subject's error. i'm using this insert sentence: $query = "insert into VENT_NPCA values ( '1', 'NPC', '&quo...