Search Results

Showing results 1 to 40 of 44
Search took 0.01 seconds.
Search: Posts Made By: MCP
Forum: MS SQL Jan 16th, 2007
Replies: 2
Views: 10,351
Posted By MCP
Also, look at the SUBSTITUTE function
Forum: PHP Jan 14th, 2007
Replies: 2
Views: 2,103
Posted By MCP
How about something like:

select count(*)
from students
where total_raised > (select total_raised from students where uid=$uid)

This should tell you how many students have total_raised...
Forum: MS SQL Jan 12th, 2007
Replies: 2
Views: 5,063
Posted By MCP
1. You won't lose anything -- you can import the old into the new as legacy DTS packages. SQL Server 2005 comes with SSIS, which is a little more complex than DTS, but definitely better!

3. No, it...
Forum: PHP Jan 11th, 2007
Replies: 15
Views: 13,423
Posted By MCP
While a form using the post method is less obvious then the ?id=xyz in the url, they're both just as hackable. If you want to verify (assuming you're running windows), check out Microsoft Fiddler,...
Forum: PHP Jan 10th, 2007
Replies: 15
Views: 13,423
Posted By MCP
No problem! FYI, you can pass multiple variables by doing:

whatever.php?id=5&variable2=whatever&xyz=aaa
Forum: MS SQL Jan 9th, 2007
Replies: 1
Views: 1,639
Posted By MCP
I'm not too familiar with SQL Server's replication feature.

For your import/export however, what error messages did you get while trying to move data from dbaseB to dbaseC? If it's the same...
Forum: MS SQL Jan 9th, 2007
Replies: 3
Views: 8,691
Posted By MCP
I think you're better off avoiding cursors where possible! It's much slower than a straight up statement, such as:


select name,
substring(name,1,charindex(' ', actor_name)-1) FirstName,
...
Forum: PHP Jan 9th, 2007
Replies: 15
Views: 13,423
Posted By MCP
Just build each link like:

<a href='editform.php?id=53'>John Doe</a>
Forum: PHP Jan 2nd, 2007
Replies: 5
Views: 5,231
Posted By MCP
Maybe use something in javascript along the lines of:

function validateImage(url){
var img = new Image();
img.src = url;
return img.height>0;
}
which should return true if the image...
Forum: MS SQL Dec 16th, 2006
Replies: 3
Views: 4,062
Posted By MCP
have a look at the sp_executesql (or is it sp_execute -- can't remember). with this method, you build your string in SQL, then execute it with the SP above. BOL should have more info and examples
Forum: PHP Dec 12th, 2006
Replies: 7
Views: 1,611
Posted By MCP
Smarty (http://smarty.php.net) is a pretty good templating system that you can use as part of a flat file db system. You'll still need to store the editable data somewhere -- flat file or db -- and...
Forum: MS SQL Dec 9th, 2006
Replies: 3
Views: 3,269
Posted By MCP
Valid theoretical question (I think it will error with overflow), but do you practically think you'll get there? bigint can go up to 9,223,372,036,854,775,807

That's pretty big... Just to try and...
Forum: MS SQL Dec 9th, 2006
Replies: 5
Views: 19,182
Posted By MCP
Are all the values in the column like 000000001? Because you could just do field+0 that would implicitly convert it... or cast(field as int) to explicitly do it. if you have mixed fields, then you...
Forum: MS SQL Dec 9th, 2006
Replies: 1
Views: 1,622
Posted By MCP
see DBCC CHECKTABLE in BOL for more info... be careful about the repair, as it could invalidate.. but it should fix the table even if some of the data might be lost. Good luck!
Forum: MS SQL Dec 6th, 2006
Replies: 5
Views: 19,182
Posted By MCP
CASE is used when you want to return different values based on different conditions, such as:

select case when priority=1 then 'Low' when priority=2 then 'Med' when priority=3 then 'High' end from...
Forum: MS SQL Dec 4th, 2006
Replies: 3
Views: 2,616
Posted By MCP
aah.. i keep on missing the "desc" in the order by, but that should be easy enough to figure out :)

select top 3 d1.num num1, d2.num num2
from data d1 inner join data d2 on (d1.date=d2.date) and...
Forum: MS SQL Dec 3rd, 2006
Replies: 3
Views: 2,616
Posted By MCP
actually, no need for the distinct count.. :

select top 3 d1.num num1, d2.num num2
from data d1 inner join data d2 on (d1.date=d2.date) and (d1.num<d2.num)
group by d1.num, d2.num
having...
Forum: MS SQL Dec 3rd, 2006
Replies: 3
Views: 2,616
Posted By MCP
My approach would be something like the following, assuming the second data structure. (It's untested)

select top 3 d1.num num1, d2.num num2
from data d1 inner join data d2 on (d1.date=d2.date)...
Forum: PHP Dec 2nd, 2006
Replies: 2
Views: 79,153
Posted By MCP
Here's one, although the latest version is not yet available
http://whitefyre.com/poxy/
Forum: PHP Nov 29th, 2006
Replies: 8
Views: 2,511
Posted By MCP
Well, I'm not at all familiar with XFORMS, but you can use (assuming you're under Windows) Microsoft Fiddler to examine the data transferred. You can pick up the headers that are normally sent from...
Forum: PHP Nov 26th, 2006
Replies: 1
Views: 1,600
Posted By MCP
The mysqli code is causing a fatal error (not sure that it's available in PHP 4.x), and stopping the rest of the script from executing. If you remove the "@" from in front of the line, you will see...
Forum: PHP Nov 25th, 2006
Replies: 2
Views: 1,320
Posted By MCP
What database software are you using? Some have full text search capabilities which are quite neat. You could search for "styles" or "styling", and it would match "Style", because they're related....
Forum: Database Design Nov 18th, 2006
Replies: 2
Views: 2,235
Posted By MCP
Do you really need to send all 30 000 records? Can you instead send only relevant parts and have a central consolidation process?

Also, zip works wonders with access mdb files. I customarily get...
Forum: MySQL Nov 18th, 2006
Replies: 1
Views: 1,975
Posted By MCP
This belongs in the MSSQL forum, but the corresponding datatype is the more powerful identity data type. I don't think it supports 'random' like access, but you can start from any number, and you can...
Forum: MS SQL Nov 18th, 2006
Replies: 1
Views: 2,289
Posted By MCP
Is "SQL Active Directory" performing certificate verification against crl.microsoft.com? I had an issue with other components of SQL Server 2005 wanting to check revocation of certificate against...
Forum: MS SQL Nov 17th, 2006
Replies: 4
Views: 2,401
Posted By MCP
Yup, that's correct, color is the "physical" name of the column.
Forum: MS SQL Nov 16th, 2006
Replies: 4
Views: 2,401
Posted By MCP
Well, the bad way would be to do something like:

select case color when 0 then 'black' when 1 then 'white' when 2 then 'red' when 4 then 'blue' end as color from myTable

ideally, you would...
Forum: MS SQL Nov 16th, 2006
Replies: 1
Views: 9,999
Posted By MCP
I don't have my sql server readily available, but you could use the "create trigger" command, then use the logical tables "inserted" and "deleted" (which represent what is and what was, respectively)...
Forum: MS SQL Nov 13th, 2006
Replies: 2
Views: 4,735
Posted By MCP
If the user running the query has rights to select the table in the other database, you will be able to. the syntax is something like:

select * from tableA join otherDB.dbowner.tableB on...
Forum: PHP Nov 4th, 2006
Replies: 5
Views: 1,713
Posted By MCP
well, all you need to keep track of then is the sum and the number of ratings so that you when you get a new rating, you'd just do

UPDATE ratings SET sumRatings=sumRatings+{$newRating},...
Forum: PHP Oct 29th, 2006
Replies: 6
Views: 8,269
Posted By MCP
yup, either way is probably fine -- whichever way works.. I can't see any benefits of doing it one way or the other
Forum: PHP Oct 28th, 2006
Replies: 6
Views: 8,269
Posted By MCP
check out php's array_values function, which will essentially reindex the arrays
Forum: MySQL Oct 22nd, 2006
Replies: 2
Views: 13,894
Posted By MCP
try:

SELECT username, SUM(daily_units+rare_units) FROM table GROUP BY username ORDER BY SUM(daily_units+rare_units) desc

the sum function works by summing rows, not separate fields (i.e. it...
Forum: MS SQL Oct 19th, 2006
Replies: 2
Views: 4,915
Posted By MCP
How are you moving the data? Through SQL statements? Through the EM Import Wizard?

Anyhow, the answer is enabling "identity insert" in your target table B. This option can only be active for one...
Forum: PHP Oct 19th, 2006
Replies: 3
Views: 1,713
Posted By MCP
Using Microsoft Fiddler (great program for some debugging and such!), I can see that your server is indeed doing what Puckdropper said .. no content type in the header.

Your server's return...
Forum: PHP Oct 15th, 2006
Replies: 6
Views: 2,187
Posted By MCP
Well, what would you like to do when the feed is not available? I'm assuming that there is something else that the page will display... You're on the right track, basically (without knowing more...
Forum: PHP Oct 15th, 2006
Replies: 2
Views: 1,351
Posted By MCP
First Issue:
You can use:

list($month,$day,$year)=preg_split("/[,\s]/",$date); // (untested!)


or you can use the strtotime() function, which will convert it to a php datetime, and then do...
Forum: PHP Oct 14th, 2006
Replies: 1
Views: 2,590
Posted By MCP
I think the standard way is to check the file extension, or to check the mime type.

Of course, none of this guarantees that the uploaded file is a valid "audio" file. (What is an audio file for...
Forum: PHP Oct 14th, 2006
Replies: 6
Views: 2,666
Posted By MCP
...or in php use setcookie (http://ca3.php.net/manual/en/function.setcookie.php)

I'm assuming you're looking for the PHP code =)
Forum: Search Engine Optimization Oct 4th, 2006
Replies: 22
Views: 3,735
Posted By MCP
tgreer, it depends on the URL, specifically the types and number of parameters present. stymiee is more correct in this regard. There's a video by Matt Cutts (see...
Showing results 1 to 40 of 44

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC