I am trying to get php 4.3.1 apache 1.3x and the mssql functions working. When I try to run a basic connection, just to connect to the (remote) mssql server apache crashes, keep getting a page fault error in the ntwdbdlib.dll file. Note this system is on win98se..
thanks,
$phone = '6467897654';
$phone = ereg_replace("([0-9]{3})([0-9]{3})([0-9]{4})", "(\1) \2-\3", $phone);
the output comes out like
() -
need phone number to look like (646)789-7654
And is there any difference between regex on windows and linux?
ok this is probably very simple but I cant figure out how to do it. :(
$query2 = "select * from links, linkscat where linked = 1 and category ='".$_GET['cat']."' and category = linkscat.id";
$result2 = mysql_query($query2);
echo $catname;
while ($row2 = mysql_fetch_assoc($result2)) { ?>...
say theres a query
mysql_query("select * from table where id ='$id'");
how can I print out the query statement? i.e...
select * from table where id = 3
thanks
I have two columns, one is an int and the other is a date,
I want the records to show first the null values in the int column and have that sorted by date, then the rest of the rows sorted by date.
I tried doing
order by int asc, date asc, but it only orders the null values properly.
so this...
i have two machines win98se, winxp pro sp2 sharing an internet connection through a netgear router. That works fine. I tried to enable file sharing on both computers and cant get it to work.
win98se 192.168.0.2 255.255.255.0
winxp pro sp2 192.168.0.3 255.255.255.0
gateway 192.168.0.1
DHCP...
I have verizon adsl, using an old westell modem, i can get onlin with it (I am on it right now) hooked up to one computer directly. But when I try to hook up the netgear router (its a mr814 version 3) between the pc and the westell modem I cant get online. (note win98se is the OS)
I called up...
I figured out how to resize a window based on one image inside the window, but how would I resize the window to show multiple images in the popup window?
ok I am trying to make something really basic.... (php 4.3.9 mysql 4.0)
The admin panel consists of:
The view and add features work.
The edit feature refuses to do anything.
The delete feature only works as a link with a get method.
I want it to work as a post method with a submit button.
The...
(max(col1-col2)) *0.5 - (col1-col2) * 0.5
Forgive me if I am wrong
(max(4-2)) * 0.5 = 1
(2-4) * 0.5 = -1
and 1 - (-1) = 2 mathematically
So why are my results coming out to zero?
count(case when col1 = list.value and col3 > col4 then col2 end) as calc1,
count(case when col1 = list.value and col3 < col4 then col2 end) as calc2 from calculations, list group by list.value
theres two tables one with a list of values of in it, and another with four columns (integer values)...
say you got:
select sum(col1) as col2, sum(col3) as col4, (col2+col4)/col2 as answer from table
Is it possible to do mathematical operations on aliased columns?
Havent found much in the manual about it.
say theres a table with 4 columns
col1 col2 col3 col4
val1 val2 4 3
val3 val1 5 4
val1 val4 6 2
I am trying to find out how many times value one is in one column based on a condition, and how many times its in the other column based on another condition. Unfortunately I cant use...
SELECT team, w, l, sum( w / ( w + l ) ) AS pct, MAX( w - l ) - ( w - l ) / 2 AS gb
FROM standings
GROUP BY team
ORDER BY w DESC
I am wondering why its calculating wrong.
max(4-0) - (1-3)/2
MAX( w - l ) - ( w - l ) / 2
Mathematically the above should equal 3, its outputting -1
(4-0) -...
say theres a listing of files in a directory, and you want to list 12 files per page...
if ($handle = opendir('./dir')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href=\"$file\">$file</a><br>" ;
}
$totalfiles...
is it possible to sum the results of a union all query?
example:
SELECT col1 FROM table WHERE col3 = 'value 1'
UNION ALL
SELECT col2 FROM table WHERE col4 = 'value 1'
can all the results from col1 and col2 be summed together?
thanks,
I have 4 divs. One is on top 600px wide.
Below it are 3 in column format each 200px wide. All four divs have a 1px solid border.
The problem is that the 3 column divs stretch out horizontally at least two pixels. I added border-right:0px and border-left:0px to the middle column. That shrank it a...
I am running apache 1.3x and I was wondering how does one redirect a user to another port. say the user types in http://www.domain.com, apache should redirect the user to http://www.domain.com:200
thanks,
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.