Forum: MS SQL Jan 16th, 2007 |
| Replies: 2 Views: 5,496 |
Forum: PHP Jan 14th, 2007 |
| Replies: 2 Views: 1,364 Re: Sorting Database Results 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 greater... |
Forum: MS SQL Jan 12th, 2007 |
| Replies: 2 Views: 3,204 Re: SQL 2005 upgrade questions 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: 7,499 Re: Can a text link pass php variables? 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: 7,499 |
Forum: MS SQL Jan 9th, 2007 |
| Replies: 1 Views: 1,174 Re: Data Replication 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 schema,... |
Forum: MS SQL Jan 9th, 2007 |
| Replies: 3 Views: 4,685 Re: Splitting Full name data to First, Last 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: 7,499 |
Forum: PHP Jan 2nd, 2007 |
| Replies: 2 Views: 2,784 |
Forum: MS SQL Dec 16th, 2006 |
| Replies: 3 Views: 2,535 Re: How to write this sql statement? 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,237 Re: Coding help - Is this possible? I think it is. 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: 2,462 Re: IDENTITY question 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: 8,211 Re: Incorrect syntax near '='. 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,211 Re: Table query returning error -- help! 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: 8,211 Re: Incorrect syntax near '='. 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: 1,792 Re: Just for fun Lotto SQL 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: 1,792 Re: Just for fun Lotto SQL 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: 1,792 Re: Just for fun Lotto SQL 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) and... |
Forum: PHP Dec 2nd, 2006 |
| Replies: 2 Views: 36,423 Re: anti proxy Here's one, although the latest version is not yet available
http://whitefyre.com/poxy/ |
Forum: PHP Nov 29th, 2006 |
| Replies: 8 Views: 1,903 Re: Php & Xhtml 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,039 Re: OO syntax in PHP 4? 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: 907 Re: Seacrch text using php 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: 1,711 Re: Access Database file conversion 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 it... |
Forum: MySQL Nov 18th, 2006 |
| Replies: 1 Views: 1,486 Re: MS Access v/s MS SQL Server 2000 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: 1,622 Re: SQL slow in Domain Control 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: 1,778 |
Forum: MS SQL Nov 15th, 2006 |
| Replies: 4 Views: 1,778 Re: Altering data when reading it from a database 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 create a... |
Forum: MS SQL Nov 15th, 2006 |
| Replies: 1 Views: 6,015 Re: SQL trigger based on a true/false field value 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: 2,976 |
Forum: PHP Nov 4th, 2006 |
| Replies: 5 Views: 1,233 Re: Rateing option using php 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: 5,318 |
Forum: PHP Oct 28th, 2006 |
| Replies: 6 Views: 5,318 |
Forum: MySQL Oct 22nd, 2006 |
| Replies: 2 Views: 6,175 |
Forum: MS SQL Oct 18th, 2006 |
| Replies: 2 Views: 3,375 Re: Identity Column Problem in MS SQL Server 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 18th, 2006 |
| Replies: 3 Views: 1,270 Re: PHP errors on netscape enterprise server 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: 1,682 Re: Help With a PHP RSS Parser 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,040 Re: Breaking strings 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 whatever... |
Forum: PHP Oct 14th, 2006 |
| Replies: 1 Views: 1,634 Re: Specify File type 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 you?... |
Forum: PHP Oct 14th, 2006 |
| Replies: 6 Views: 1,656 Re: Remember ME option ...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: 2,579 Re: PHP or ASP 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... |