[PHP-DB] Problems mssql_get_last_message()

2002-07-12 Thread Michael Bretterklieber

Hi,

I have problems with mssql_get_last_message(). This function doesen't 
return the whole error message, it only returns Die Anweisung wurde 
beendet and not the specific error message. Now I use something like 
this to workaround the problem:

... snip ...
$this-errno = mssql_result(@$this-priv_query('SELECT @@ERROR as 
errorcode', $this-dbc), 0 , 'errorcode');
$this-error = mssql_result($this-priv_query(SELECT description FROM 
master.dbo.sysmessages WHERE error=$this-errno and msglangid = 1031, 
$this-dbc), 0, 'description');
$this-error = str_replace ('%', '%%', $this-error);

but the problem is, that I get the error message with placeholders (not 
parsed):
Die %1!-Anweisung verstieß gegen die %2! %3!-Einschränkung '%4!'. Der 
Konflikt trat in der %6!-Datenbank, Tabelle '%8!'%10!%11!%13! auf.)

are there any hints to get mssql_get_last_message() to work?

bye,
-- 
--
Michael Bretterklieber
LCP
JAWA Management Software GmbH
Liebenauer Hauptstr. 200
A-8041 GRAZ
Tel: ++43-(0)316-403274-12
Fax: ++43-(0)316-403274-10
GSM: ++43-(0)676-93 96 698
[EMAIL PROTECTED]
homepage: http://www.jawa.at
- privat ---
E-mail:   [EMAIL PROTECTED]
homepage: http://www.inode.at/mbretter
--
...the number of UNIX installations has grown to 10, with more expected...
   - Dennis Ritchie and Ken Thompson, June 1972


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MSSQL, PHP, Linux, and FreeTDS???

2002-07-12 Thread Tim Nields

Can someone please give me any kind of advice on what it is I need to do in
order to configure a Linux box to talk to a MSSQL 2000 box.  I have found
various sets of directions, none of which resemble each other, and none of
which work.

I would greatly appreciate if any one could lend me a hand with
configuration information in this regard.

Thanks in advance,

Tim Nields



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] problem with php and unixODBC

2002-07-12 Thread Marten Lehmann

Hello,

my unixODBC-2.2.2 installation works fine. I tested the configuration with a 
local and a remote ressource to a Sybase Adaptive Server Anywhere database with 
isql (a testing tool of unixODBC). Thus the settings in the odbc.ini and 
odbcinst.ini should be correct. But when I'm using PHP-4.2.1 with 
unixODBC-support, I can connect to the local ressource only, not to the 
remote-ressource, although it worked with isql. Do you have any general ideas, 
why it doesn't work?

Are there known issues about the unixODBC-implementation in php? PHP always says 
unable to connect to server: database not found. But as I told before, the 
odbc.ini settings are correct. It seems that php tries to connect to a local 
server although in odbc.ini CommLinks-settings are defined. Does maybe php don't 
receive the odbc.ini data correct? I thought that it might be a permission 
problem, but I ran apache 1.3.26 (with php as module) with the same user to whom 
all the files and databases belong and I got no positive result.

Regards
Marten Lehmann


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Php Cacheing everything?

2002-07-12 Thread Khristopher_Klaich

Hi everyone .

I recently upgraded apache to 1.3.26 and I configured it with php 4.0.5 
and now every page that I write get cached on the client.  I have tried to 
insert the code to prevent that in different formats in the head section 
of my page however no luck.  I am thinking it is somthing to do with the 
php.ini file but so far I have had no luck.anyone run into anything 
like this?



[PHP-DB] Final Year Computer Science Project involving PHP

2002-07-12 Thread Serdar Sokmen

Hi,

Please read the rest of this email if you're interested in helping final
year

Computer Science student (yes, that's me...) by giving him some ideas on his
final

year project very possible involving PHP and SQL...

I will start next autumn my third year of Computer Science studies. I have
to carry

out a large programming project in this final year. These projects are
supervised

and assessed via a dissertation and an oral presentation. The project alone
counts

for 20% of my whole degree, so it is quite important.

A variety of project proposals have been made available for our
consideration

already but they all look very dull and boring. We are also encouraged to
come up

with our own project ideas.

The onus is on us to define the problem boundaries, to investigate possible

solutions, and to present the results verbally, in writing and (possibly) to

demonstrate in action. They like having projects that find solutions (or
improve a

current sloution) real life problems.

This summer, I am doing an internship in a Swiss IT company, working on a
Content

Management System implemented with PHP and MySQL. This will obviously give
me some

valuable experience with these languages (I sort of already learn them quite

well...) and most of our tuition in Uni is based on Java.

If you can think of an interestin final year project involving hese
languages, it

would be very kind to share it with me... In order to obtain a very high
mark, the

project needs to be challenging. For example, having an e-commerce web-site
using a

Database is seen as a weak, non-innovative project...


Many Thanks for your time

Serdar Sokmen
[EMAIL PROTECTED]






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Final Year Computer Science Project involving PHP

2002-07-12 Thread Paul Cooper

Well, it's not Java, PHP, or Mysql, but if you want a challenging
project then have a look at libmcal
http://sourceforge.net/projects/libmcal/

It's meant to provide calendar services and includes the beginnings of
an icap server - which is to a calendar what IMAP is to email. There is
also a PHP libmcal module to allow you access to the mstore backend (the
horde project uses this a one type of calendar storage). There is also a
shell of gtk calendar app but it would be more interesting to write a
bonobo / kpart plugin for it.

Right now the project has stagnated, it's tricky to install, and
probably has a few bugs, and also has stuff yet to be implemented. 

This is a challenging project worthy of a very high mark (if you, or
anyone else, can get it working that is).

HTH,

Paul

On Fri, 2002-07-12 at 16:13, Serdar Sokmen wrote:
 Hi,
 
 Please read the rest of this email if you're interested in helping final
 year
 
 Computer Science student (yes, that's me...) by giving him some ideas on his
 final
 
 year project very possible involving PHP and SQL...
 
 I will start next autumn my third year of Computer Science studies. I have
 to carry
 
 out a large programming project in this final year. These projects are
 supervised
 
 and assessed via a dissertation and an oral presentation. The project alone
 counts
 
 for 20% of my whole degree, so it is quite important.
 
 A variety of project proposals have been made available for our
 consideration
 
 already but they all look very dull and boring. We are also encouraged to
 come up
 
 with our own project ideas.
 
 The onus is on us to define the problem boundaries, to investigate possible
 
 solutions, and to present the results verbally, in writing and (possibly) to
 
 demonstrate in action. They like having projects that find solutions (or
 improve a
 
 current sloution) real life problems.
 
 This summer, I am doing an internship in a Swiss IT company, working on a
 Content
 
 Management System implemented with PHP and MySQL. This will obviously give
 me some
 
 valuable experience with these languages (I sort of already learn them quite
 
 well...) and most of our tuition in Uni is based on Java.
 
 If you can think of an interestin final year project involving hese
 languages, it
 
 would be very kind to share it with me... In order to obtain a very high
 mark, the
 
 project needs to be challenging. For example, having an e-commerce web-site
 using a
 
 Database is seen as a weak, non-innovative project...
 
 
 Many Thanks for your time
 
 Serdar Sokmen
 [EMAIL PROTECTED]
 
 
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
-
Paul Cooper |  Tel: 0121 331 7858
Senior Programmer and Database Engineer |  Fax: 0121 331 7859
UCEcom  |  mailto:[EMAIL PROTECTED]
University of Central England   |  http://www.ucecom.com
Birmingham, B4 7DX  |
-


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MS Sql Server xp_sqlagent_proxy_account

2002-07-12 Thread Ryan Jameson (USA)

exec master.dbo.xp_sqlagent_proxy_account N'GET' 

Anyone ever had the above give you Access is denied. When you run it as 'sa' ???

 Ryan

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MS Sql Server xp_sqlagent_proxy_account

2002-07-12 Thread Ryan Jameson (USA)

Figured it out. The SQL Service account was a domain account and did not have 
administrator privilege on the server it ran on. Strangely enough the procedure needs 
some kind of special local permissions.

 Ryan

-Original Message-
From: Ryan Jameson (USA) 
Sent: Friday, July 12, 2002 9:57 AM
To: php.db
Subject: [PHP-DB] MS Sql Server xp_sqlagent_proxy_account


exec master.dbo.xp_sqlagent_proxy_account N'GET' 

Anyone ever had the above give you Access is denied. When you run it as 'sa' ???

 Ryan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area

2002-07-12 Thread Jay Blanchard

No, it's not a dating service :)
Want to meet other PHP developers in your area? Check out:

http://php.meetup.com/

Pretty nifty idea... especially given the lack of user groups in the U.S.
[/snip]

I thought for others who had not seen this I would post this. There is
probably already a user group in your area if you live near a major city.
According to the PHPusergroups.org web site
[http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user
groups in 52 countries.

Jay

Chaos, panic  disorder…my work here is done!



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Adding and Stripping Slashes

2002-07-12 Thread Blaine D. Dinsmore

I was wondering if anyone knew a good method for handling data pulled from a
MySQL database to the browser as well as grabbing the same data using ODBC
in crystal reports. I would like the data to appear in the output for both
browser and crystal without slashes that are placed before quotes.

Thanks,

Blaine



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Blaine D. Dinsmore

I'm using MySQL and I have noticed that my primary key which are
autoincrementing numbers do not sort properly when pulling the results to
the browser. They are showing consecutively all the way until 150 then they
start going backwards for example:
157
156
155
154
159
160
161
162
163
When I do a query in MySQL they are sequenced correctly but using the php
mysql_fetch_array() I get this crazy numbering sequence. Does anyone know
what this could be?

Here is my code:

body bgcolor=#00 text=#FF link=#99FF33 vlink=#00
alink=#99CCFF
FONT FACE=ARIAL
?php
 include('functions.php');

 $dbase=lims_issues;
If ($_GET[order] == 1) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs;
}

If ($_GET[order] == 2) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=0;
}

If ($_GET[order] == 3) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=1;
}

If ($_GET[order] == 4) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=0;
echo(font size=5bIssues Not Disscussed With Beckman/b/font);
}

If ($_GET[order] == 5) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=1;
echo(font size=5bIssues Disscussed With Beckman/b/font);
}
mysqlconn($dbase,$sql);


   while( $myrow = mysql_fetch_array($result) ){
?
Table border=1 cellpadding=0 cellspacing=0 style=border-collapse:
collapse bordercolor=#77 width=100%
  TR bgcolor=#006600
TD colspan=3
  ?php echo(bIssue ID: /b . a href=modify.php?getprobid=
.$myrow[probid] . . $myrow[probid] . /a); ?
  /TD
  ?php
   if ($myrow[resolved] == '1') {
   Echo(TD bgcolor=#006600);
   Echo(bfont color=#FFResolved/font/b);
   Echo(/TD);



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Hutchins, Richard

Would using sort($result); solve the problem? I believe the default sort
order is ascending. Try using sort($result) before your while($myrow =
mysql_fetch_array($result)) statement and see if that fixes things.

I also noticed that you don't use an ORDER BY clause in your sql statement,
but if the query works in MySQL, then I guess it's not necessary?

Good Luck
Rich

-Original Message-
From: Blaine D. Dinsmore [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 12:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ID numbers not sorting Properly


I'm using MySQL and I have noticed that my primary key which are
autoincrementing numbers do not sort properly when pulling the results to
the browser. They are showing consecutively all the way until 150 then they
start going backwards for example:
157
156
155
154
159
160
161
162
163
When I do a query in MySQL they are sequenced correctly but using the php
mysql_fetch_array() I get this crazy numbering sequence. Does anyone know
what this could be?

Here is my code:

body bgcolor=#00 text=#FF link=#99FF33 vlink=#00
alink=#99CCFF
FONT FACE=ARIAL
?php
 include('functions.php');

 $dbase=lims_issues;
If ($_GET[order] == 1) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs;
}

If ($_GET[order] == 2) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=0;
}

If ($_GET[order] == 3) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=1;
}

If ($_GET[order] == 4) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=0;
echo(font size=5bIssues Not Disscussed With Beckman/b/font);
}

If ($_GET[order] == 5) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=1;
echo(font size=5bIssues Disscussed With Beckman/b/font);
}
mysqlconn($dbase,$sql);


   while( $myrow = mysql_fetch_array($result) ){
?
Table border=1 cellpadding=0 cellspacing=0 style=border-collapse:
collapse bordercolor=#77 width=100%
  TR bgcolor=#006600
TD colspan=3
  ?php echo(bIssue ID: /b . a href=modify.php?getprobid=
.$myrow[probid] . . $myrow[probid] . /a); ?
  /TD
  ?php
   if ($myrow[resolved] == '1') {
   Echo(TD bgcolor=#006600);
   Echo(bfont color=#FFResolved/font/b);
   Echo(/TD);



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Jason Wong

On Saturday 13 July 2002 00:34, Blaine D. Dinsmore wrote:
 I'm using MySQL and I have noticed that my primary key which are
 autoincrementing numbers do not sort properly when pulling the results to
 the browser. They are showing consecutively all the way until 150 then they
 start going backwards for example:
 157
 156
 155
 154
 159
 160
 161
 162
 163
 When I do a query in MySQL they are sequenced correctly but using the php
 mysql_fetch_array() I get this crazy numbering sequence. Does anyone know
 what this could be?

Use an ORDER BY clause to sort them in whatever order you need.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
A pound of salt will not sweeten a single cup of tea.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Adding and Stripping Slashes

2002-07-12 Thread Miles Thompson

Check manual for stripslashes (and addslashes)
Here's the URL: http://www.php.net/manual/en/function.stripslashes.php
Miles
At 12:10 PM 7/12/2002 -0400, Blaine D. Dinsmore wrote:
I was wondering if anyone knew a good method for handling data pulled from a
MySQL database to the browser as well as grabbing the same data using ODBC
in crystal reports. I would like the data to appear in the output for both
browser and crystal without slashes that are placed before quotes.

Thanks,

Blaine



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Miles Thompson

Blaine,
Are you adding/deleting records? Check that your MySQL tables are defined 
as type MyISAM; if they are regular ISAM table the autoincrement numbers 
are reused. That was a surprise!
That may not be the problem, but I see you don't have an ORDER BY clause 
in your SQL. Add one, ORDER BY probid if probid is your autoinc field.
Cheers - Miles Thompson

At 12:34 PM 7/12/2002 -0400, Blaine D. Dinsmore wrote:
I'm using MySQL and I have noticed that my primary key which are
autoincrementing numbers do not sort properly when pulling the results to
the browser. They are showing consecutively all the way until 150 then they
start going backwards for example:
157
156
155
154
159
160
161
162
163
When I do a query in MySQL they are sequenced correctly but using the php
mysql_fetch_array() I get this crazy numbering sequence. Does anyone know
what this could be?

Here is my code:

body bgcolor=#00 text=#FF link=#99FF33 vlink=#00
alink=#99CCFF
FONT FACE=ARIAL
?php
  include('functions.php');

  $dbase=lims_issues;
If ($_GET[order] == 1) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
  FROM bugs;
}

If ($_GET[order] == 2) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
  FROM bugs WHERE resolved=0;
}

If ($_GET[order] == 3) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
  FROM bugs WHERE resolved=1;
}

If ($_GET[order] == 4) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
  FROM bugs WHERE discussed=0;
echo(font size=5bIssues Not Disscussed With Beckman/b/font);
}

If ($_GET[order] == 5) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
  FROM bugs WHERE discussed=1;
echo(font size=5bIssues Disscussed With Beckman/b/font);
}
mysqlconn($dbase,$sql);


while( $myrow = mysql_fetch_array($result) ){
 ?
Table border=1 cellpadding=0 cellspacing=0 style=border-collapse:
collapse bordercolor=#77 width=100%
   TR bgcolor=#006600
 TD colspan=3
   ?php echo(bIssue ID: /b . a href=modify.php?getprobid=
.$myrow[probid] . . $myrow[probid] . /a); ?
   /TD
   ?php
if ($myrow[resolved] == '1') {
Echo(TD bgcolor=#006600);
Echo(bfont color=#FFResolved/font/b);
Echo(/TD);



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Martin Clifford

MySQL has no obligations when it comes to sorting result sets.  If you want it sorted 
a certain way, it'd be in your best interest to declare it with ORDER BY item_id ASC, 
if that's your flavor.

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Hutchins, Richard [EMAIL PROTECTED] 07/12/02 01:44PM 
Would using sort($result); solve the problem? I believe the default sort
order is ascending. Try using sort($result) before your while($myrow =
mysql_fetch_array($result)) statement and see if that fixes things.

I also noticed that you don't use an ORDER BY clause in your sql statement,
but if the query works in MySQL, then I guess it's not necessary?

Good Luck
Rich

-Original Message-
From: Blaine D. Dinsmore [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 12, 2002 12:34 PM
To: [EMAIL PROTECTED] 
Subject: [PHP-DB] ID numbers not sorting Properly


I'm using MySQL and I have noticed that my primary key which are
autoincrementing numbers do not sort properly when pulling the results to
the browser. They are showing consecutively all the way until 150 then they
start going backwards for example:
157
156
155
154
159
160
161
162
163
When I do a query in MySQL they are sequenced correctly but using the php
mysql_fetch_array() I get this crazy numbering sequence. Does anyone know
what this could be?

Here is my code:

body bgcolor=#00 text=#FF link=#99FF33 vlink=#00
alink=#99CCFF
FONT FACE=ARIAL
?php
 include('functions.php');

 $dbase=lims_issues;
If ($_GET[order] == 1) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs;
}

If ($_GET[order] == 2) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=0;
}

If ($_GET[order] == 3) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=1;
}

If ($_GET[order] == 4) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=0;
echo(font size=5bIssues Not Disscussed With Beckman/b/font);
}

If ($_GET[order] == 5) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=1;
echo(font size=5bIssues Disscussed With Beckman/b/font);
}
mysqlconn($dbase,$sql);


   while( $myrow = mysql_fetch_array($result) ){
?
Table border=1 cellpadding=0 cellspacing=0 style=border-collapse:
collapse bordercolor=#77 width=100%
  TR bgcolor=#006600
TD colspan=3
  ?php echo(bIssue ID: /b . a href=modify.php?getprobid=
.$myrow[probid] . . $myrow[probid] . /a); ?
  /TD
  ?php
   if ($myrow[resolved] == '1') {
   Echo(TD bgcolor=#006600);
   Echo(bfont color=#FFResolved/font/b);
   Echo(/TD);



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Ryan Jameson (USA)

I'm amazed at how many seasoned developers think that doing a select with no order by 
clause will always return the records in the order they went into the database. That 
is an absolute no-no. The problem is, it usually will, but try restoring a backup or 
bulk loading and see what happens. Even if your database documentation (whatever it 
is) says it supports it, don't rely on it... EVER! :-)

Users are worse, USER: I want my report in the order that the entries went in .. 
DEVELOPER: sorry, for 3 years now you've been storing data but no entry date and your 
keys are not incremental, not to mention your program reuses keys ... USER: well fix 
it ... DEVELOPER: well, I can't fix it, not for the old data anyway ...  USER: 
Well, that's just great! I thought you were suppose to be able to help us! ... 
DEVELOPER: You picked the tool, we just do our best to support it. ... 

Anyway... sorry for the tangent. :-)

 Ryan

-Original Message-
From: Martin Clifford [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 12:14 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP-DB] ID numbers not sorting Properly


MySQL has no obligations when it comes to sorting result sets.  If you want it sorted 
a certain way, it'd be in your best interest to declare it with ORDER BY item_id ASC, 
if that's your flavor.

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Hutchins, Richard [EMAIL PROTECTED] 07/12/02 01:44PM 
Would using sort($result); solve the problem? I believe the default sort
order is ascending. Try using sort($result) before your while($myrow =
mysql_fetch_array($result)) statement and see if that fixes things.

I also noticed that you don't use an ORDER BY clause in your sql statement,
but if the query works in MySQL, then I guess it's not necessary?

Good Luck
Rich

-Original Message-
From: Blaine D. Dinsmore [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 12, 2002 12:34 PM
To: [EMAIL PROTECTED] 
Subject: [PHP-DB] ID numbers not sorting Properly


I'm using MySQL and I have noticed that my primary key which are
autoincrementing numbers do not sort properly when pulling the results to
the browser. They are showing consecutively all the way until 150 then they
start going backwards for example:
157
156
155
154
159
160
161
162
163
When I do a query in MySQL they are sequenced correctly but using the php
mysql_fetch_array() I get this crazy numbering sequence. Does anyone know
what this could be?

Here is my code:

body bgcolor=#00 text=#FF link=#99FF33 vlink=#00
alink=#99CCFF
FONT FACE=ARIAL
?php
 include('functions.php');

 $dbase=lims_issues;
If ($_GET[order] == 1) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs;
}

If ($_GET[order] == 2) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=0;
}

If ($_GET[order] == 3) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE resolved=1;
}

If ($_GET[order] == 4) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=0;
echo(font size=5bIssues Not Disscussed With Beckman/b/font);
}

If ($_GET[order] == 5) {
$sql= SELECT probid,resolved,loggerid,DATE_FORMAT(logdate,'%m-%d-%Y') AS
date,priority,screen,descript,notes .
 FROM bugs WHERE discussed=1;
echo(font size=5bIssues Disscussed With Beckman/b/font);
}
mysqlconn($dbase,$sql);


   while( $myrow = mysql_fetch_array($result) ){
?
Table border=1 cellpadding=0 cellspacing=0 style=border-collapse:
collapse bordercolor=#77 width=100%
  TR bgcolor=#006600
TD colspan=3
  ?php echo(bIssue ID: /b . a href=modify.php?getprobid=
.$myrow[probid] . . $myrow[probid] . /a); ?
  /TD
  ?php
   if ($myrow[resolved] == '1') {
   Echo(TD bgcolor=#006600);
   Echo(bfont color=#FFResolved/font/b);
   Echo(/TD);



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] convert mysql table to Excell or Access file

2002-07-12 Thread Alex Shi

Can MySQL table be converted to Access or Excell format?

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] convert mysql table to Excell or Access file

2002-07-12 Thread Ryan Jameson (USA)

There is an ODBC driver for MySQL that will allow you to link to it and you can do 
whatever you want from there. :-)

 Ryan

-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 4:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] convert mysql table to Excell or Access file


Can MySQL table be converted to Access or Excell format?

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: [PHP-WIN] PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area

2002-07-12 Thread C. Hendrie

Tho, when you think about it, most PHP developers COULD use a dating
service. :)

Seriously tho, this is a good idea. Thanks for the info Jay.
~ Chris
D.O.D

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 12, 2002 12:24 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP meetup [CROSS-POST] Meet other PHP Developers in
Your Area

No, it's not a dating service :)
Want to meet other PHP developers in your area? Check out:

http://php.meetup.com/

Pretty nifty idea... especially given the lack of user groups in the
U.S.
[/snip]

I thought for others who had not seen this I would post this. There is
probably already a user group in your area if you live near a major
city.
According to the PHPusergroups.org web site
[http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP
user
groups in 52 countries.

Jay

Chaos, panic  disorder.my work here is done!



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php