RE: [PHP-DB] getting data back when inserting

2004-12-01 Thread Stefan
You should easily use 

mysql_insert_id();

otherwise you could use something like:

SELECT max(id) FROM ...

But I think the first command is what you're looking for.

Stefan


 -Ursprüngliche Nachricht-
 Von: Aaron Todd [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 1. Dezember 2004 17:01
 An: [EMAIL PROTECTED]
 Betreff: [PHP-DB] getting data back when inserting
 
 I was wondering if somone might be able to suggest a command to me...I am
 inserting data into a MySQL database that has an auto-incrementing primary
 field.  When I insert the data I would like to somehow get the value of
 the
 auto-incrementing primary field.  I thought I could just run a SELECT
 statement on some of the data that I am inserting, but the problem is that
 it could have a duplicate already in the database.
 
 Anyone know of a command or something to point me in the direction I am
 looking to go?
 
 Thanks,
 
 Aaron
 
 --
 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



AW: [PHP-DB] getting data back when inserting

2004-12-01 Thread Stefan
The actual problem was the leading number in some of your arguments
(4_h_1, 4_h_2, etc)

Stefan

 -Ursprüngliche Nachricht-
 Von: Aaron Todd [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 1. Dezember 2004 18:33
 An: [EMAIL PROTECTED]
 Betreff: Re: [PHP-DB] getting data back when inserting
 
 Thanks a bunch...thats exactly what I was looking for.
 
 Aaron
 
 
 Stefan [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 You should easily use
 
 mysql_insert_id();
 
 otherwise you could use something like:
 
 SELECT max(id) FROM ...
 
 But I think the first command is what you're looking for.
 
 Stefan
 
 
  -Ursprüngliche Nachricht-
  Von: Aaron Todd [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 1. Dezember 2004 17:01
  An: [EMAIL PROTECTED]
  Betreff: [PHP-DB] getting data back when inserting
 
  I was wondering if somone might be able to suggest a command to me...I
 am
  inserting data into a MySQL database that has an auto-incrementing
 primary
  field.  When I insert the data I would like to somehow get the value of
  the
  auto-incrementing primary field.  I thought I could just run a SELECT
  statement on some of the data that I am inserting, but the problem is
 that
  it could have a duplicate already in the database.
 
  Anyone know of a command or something to point me in the direction I am
  looking to go?
 
  Thanks,
 
  Aaron
 
  --
  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] About PDO::fetchObject

2015-06-11 Thread Stefan A.
Something like this should get you started

?php


// NOT TESTED !!!

class SimpleMapper
{

private $metadata = array();
private $stmt;

public function __construct(PDOStatement $stmt, array $metadata)
{
$this-stmt = $stmt;
$this-metadata = $metadata;
}

public function map()
{
$databaseData = $this-stmt-fetchObject();
$r = new \ReflectionClass($this-metadata['class']);
$obj = $r-newInstanceWithoutConstructor();

foreach ($this-metadata['c2p'] as $col = $property) {
$val = $databaseData-$col;
$type = $property['type'] ?: 'string';
settype($val, $type);

$prop = $r-getProperty($property['name']);
$prop-setAccessible(true);
$prop-setValue($val);
}

return $obj;
}

}

// usage

class Item {
public $id;
public $name;
public $description;
}

$mapper = new SimpleMapper($stmt, array(
// the class where we want to map the database data
'class' = 'Item',
// database column to object property mapping metadata
'c2p' = array(
'ItemID' = array('name' = 'id', 'type' = 'int'),
'ItemName' = array('name' = 'name', 'type' = 'string'),
'ItemDescription' = array('name' = 'description', 'type' =
'string')
)
));

$item = $mapper-map();

On Thu, Jun 11, 2015 at 9:26 AM, Octopus Puras zlk1...@gmail.com wrote:

 I have a MySQL table, whose name is Items:
 ItemID ItemName ItemDescription

 I also have a PHP class:
 class Item {
   public $id;
   public $name;
   public $description;
 }

 If I execute $stmt-fetchObject(), I will get an object with fields of
 ItemID, ItemName, etc. But I want to adapt the name of the fields to the
 Item class. What should I do?



[PHP-DB] unixODBC and Sybase ASE 11.9.2 on a linux box

2001-02-27 Thread Stefan Siefert

Hi,

we are trying the above combination, but we do not find any hints how
(which?) we configure an ODBC - Driver for Sybase in an odbc.ini file... if
anyone has experience with this combination we would be very glad if you
could post a small overview or a source, where we can find informations
about this combination...

thx

Stefan Siefert


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] PHP Bug or configuration error?

2001-03-13 Thread Stefan Siefert

Hi Pierre...

I think the problem is, that you have configured php as cgi-apliction, and
not as an ISAPI module. I'm not sure how to configure PHP this way (cause we
run only linux - server, and no IIS..) but this should be the problem.

Greetings,

Stefan Siefert


Hallo listmembers,

i have a misterious error with php4.0.4 on windows-2000. If i call a script
this lines will be displayed in the Adress-Part of my Browsers (IE5.0 
Netscape 4.75/6):
http://localhost/php/php.exe/test/funwin/normal.php3?show=10
I dont know why "/php/php.exe" is in the Adress. I hope somebody could help
me.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] Structure Question

2001-03-27 Thread Stefan Siefert

I think you should store all files in a table with an extra table with the
filetypes (like you suggest in the end of your mail)!! In my opinion this is
a well designed database modell, 'cause you have only one table (instead of
10 or twelve depending on the count of your datatypes), but you are able to
select over the filetyp criteria!!

Stefan Siefert

-Ursprngliche Nachricht-
Von: Jordan Elver [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 27. Mrz 2001 14:38
An: PHP Database Mailing List
Betreff: [PHP-DB] Structure Question


Hi,
I want to keep filenames of different kinds of media(real sudio, qt, mp3)
for
articles in a db table. Would it be best to store each kind of media in a
different table like one table for real audio, one for quicktime, one for
mp3. Or, would it better to store them all in the same table but with
another
table telling me what kind of file it is?

Like:

media table

id | name | filename | type_id

media types

type_id | name

Any ideas folks?

Cheers,

Jord

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] Connecting and Viewing a Database

2001-03-27 Thread Stefan Siefert

Maybe you tell us, which system you are running, like linux, or windows. If
you use linux you should try to use unixODBC (Tutorial for uinxODBC and PHP:
www.unixODBC.org).. If you use windows, it should be done by uncommenting
the odbc-library in php.ini like:
extension=php_odbc.dll

Greetings,

Stefan Siefert

-Ursprngliche Nachricht-
Von: Anyangwe, Tanwani [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 27. Mrz 2001 17:49
An: '[EMAIL PROTECTED]'
Betreff: [PHP-DB] Connecting and Viewing a Database


Does anyone know how to connect and display table rows from an ODBC source
MS Access  MySQL databases?


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] configure with sybase-ct option

2001-04-27 Thread Stefan Siefert

Do you have the sybasect - libraries installed??? You need to have them
installed in order to compile PHP succesfully!
Also, if you have sybase-ct installed, specify the path
with: --with-sybase-ct=/path/to/sybasectlibs

Hope this helps,

Stefan Siefert

-Ursprungliche Nachricht-
Von: Lester June Cabrera [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 27. April 2001 10:38
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] configure with sybase-ct option



I tried to configure PHP4.0.2 with sybase-ct support. But I got this error
when running make install

In file included from internal_functions.c:33:
/export/home/lester/php-4.0.2/ext/sybase_ct/php_sybase_ct.h:58: ctpublic.h:
No such file or directory


I used the following commands:

./configure --with-nsapi=path of iPlanet
--enable-libgcc
--with-mysql=/usr/local/mysql
--enable-track-vars
--enable-short-tags
--enable-asp-tags
--with-sybase-ct
make
make install


Did I miss anything? Or should I download the latest version and install it?

Thanks,
Lester



-
Lester June Cabrera
Chief Web Programmer
I-Quest Corporation

Tel: (632) 867 8150 local 301 or 302
Fax: (63 2) 867 8077
E-mail: [EMAIL PROTECTED]

Visit the most comprehensive on-line business travel resource at
http://www.worldroom.com

Successful events start here. Visit http://www.worldroomevents.com .
The one-stop online exchange for event planners and suppliers to the MICE
industry.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: AW: AW: [PHP-DB] configure with sybase-ct option

2001-04-27 Thread Stefan Siefert

ok let's see take those:
ftp://ftp.metalab.unc.edu/pub/Linux/ALPHA/freetds/freetds-0.51.tgz
and compile them...

in your configure script of php, you
enter --with-sybase-ct=/your/freetds/installpath

Greetings,

Stefan Siefert

-Ursprungliche Nachricht-
Von: Lester June Cabrera [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 27. April 2001 11:07
An: Stefan Siefert; [EMAIL PROTECTED]
Betreff: Re: AW: AW: [PHP-DB] configure with sybase-ct option



OK. But we're running on Solaris.


At 11:11 AM 4/27/01 +0200, Stefan Siefert wrote:
Normaly, they are shipped with the database, you try to connect to... but
if
you don't have them you could get them from:
www.php.net/extra/ctlib-linux-elf.tar.gz

Stefan Siefert

-Ursprungliche Nachricht-
Von: Lester June Cabrera [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 27. April 2001 10:58
An: Stefan Siefert; [EMAIL PROTECTED]
Betreff: Re: AW: [PHP-DB] configure with sybase-ct option



You mean I need to install the sybase-ct libraries before I configure PHP?
Where can I get them?

Thanks,
Lester

At 10:58 AM 4/27/01 +0200, Stefan Siefert wrote:
 Do you have the sybasect - libraries installed??? You need to have them
 installed in order to compile PHP succesfully!
 Also, if you have sybase-ct installed, specify the path
 with: --with-sybase-ct=/path/to/sybasectlibs
 
 Hope this helps,
 
 Stefan Siefert
 
 -Ursprungliche Nachricht-
 Von: Lester June Cabrera [mailto:[EMAIL PROTECTED]]
 Gesendet: Freitag, 27. April 2001 10:38
 An: [EMAIL PROTECTED]
 Betreff: [PHP-DB] configure with sybase-ct option
 
 
 
 I tried to configure PHP4.0.2 with sybase-ct support. But I got this
error
 when running make install
 
 In file included from internal_functions.c:33:
 /export/home/lester/php-4.0.2/ext/sybase_ct/php_sybase_ct.h:58:
ctpublic.h:
 No such file or directory
 
 
 I used the following commands:
 
  ./configure --with-nsapi=path of iPlanet
  --enable-libgcc
  --with-mysql=/usr/local/mysql
  --enable-track-vars
  --enable-short-tags
  --enable-asp-tags
  --with-sybase-ct
  make
  make install
 
 
 Did I miss anything? Or should I download the latest version and install
it?
 
 Thanks,
 Lester
 
 
 
 -
 Lester June Cabrera
 Chief Web Programmer
 I-Quest Corporation
 
 Tel: (632) 867 8150 local 301 or 302
 Fax: (63 2) 867 8077
 E-mail: [EMAIL PROTECTED]
 
 Visit the most comprehensive on-line business travel resource at
 http://www.worldroom.com
 
 Successful events start here. Visit http://www.worldroomevents.com .
 The one-stop online exchange for event planners and suppliers to the MICE
 industry.
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-
Lester June Cabrera
Chief Web Programmer
I-Quest Corporation

Tel: (632) 867 8150 local 301 or 302
Fax: (63 2) 867 8077
E-mail: [EMAIL PROTECTED]

Visit the most comprehensive on-line business travel resource at
http://www.worldroom.com

Successful events start here. Visit http://www.worldroomevents.com .
The one-stop online exchange for event planners and suppliers to the MICE
industry.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] Connection to AS/400.

2001-05-07 Thread Stefan Siefert

Also if ODBC isn't native for linux (not yet) there are several ports (or
Projects) for linux the best I know is unixODBC (www.unixODBC.org), but
there is also the iodbc project (www.iodbc.org). Last but not least, is
there a company which sells ODBC solutions and support them
(www.openlinksw.com). The support is very usefull!!

Greetings,

Stefan Siefert

-Ursprüngliche Nachricht-
Von: Nicolas Machado [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 7. Mai 2001 21:36
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Connection to AS/400.


OK, I have Linux, Apache and PHP, somebody knows if exist something like
ODBC to connect to DB2/400.
I mean, exist ODBC for linux?

Thank for all.
Best Regards


---
Este Mail NO contiene Virus.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.251 / Virus Database: 124 - Release Date: 26/04/01



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] mssql_connect() function not found when I load the page...

2001-06-20 Thread Stefan Siefert

You need to uncomment the mssql.dll (or  something called like this) in your
php.ini (In the section Windows DLL's).

Greetings,

Stefan

-Ursprüngliche Nachricht-
Von: lwneo [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 20. Juni 2001 06:21
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] mssql_connect() function not found when I load the
page...


Hi,
I am running PHP with apache as server at Windows 98 platform. When I open a
page I write that will connect to Microsoft SQL Server 7.0 in my intranet, I
get the error :

mssql_connect( ) function not found.

Could someone tell me how to solve this problem?
Thanks.

lwneo.




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] newbie: Trying to select a database in php

2001-06-20 Thread Stefan Siefert

Try it with mysql_select_db($database,$connect) instead of
msql_select_db($database,$connect) :-)

msql is a different Database System (in general, it is a lot older than
mysql I think)

Stefan

-Ursprüngliche Nachricht-
Von: Paul Lockyer [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 20. Juni 2001 10:07
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] newbie: Trying to select a database in php


Im using win2k and php to retrieve and dipslay database records, however
whenever the page is loaded in a browser I get the following error (the line
in question is in bold)

Fatal error: Call to undefined function: msql_select_db() in
D:\ASP\test\php\default.php on line 18

The code I am using is below

?php

$connect = mysql_connect();

if(!$connect){
echo Could not etsablish connection to mySQL!;
exit;
}

$database = dvd_listings;

$dbb = msql_select_db($database,$connect) or die(Unable to select
Database!);

$sql = SELECT * FROM dvd_main;

$sql_result = mysql_query($sql,$connect);

echo table border=1;
echo trtdDVD Title/td/tr;

while($row = mysql_fetch_array($sql_result)){

$title = $row[main_title];
echo trtd$title/td/tr;

}

echo /table;

mysql_free_result($sql_result);
mysql_close($connection);
?

Any help would be appreciated


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] mysql_query returns nothing?

2001-07-04 Thread Stefan Siefert

Hm, since we are using PHP 4.0.6 we do get sometimes no
returnvalue...(function mysql_query) I think, this is always then, when we
are executing update oder delete syntax hm, does anyone know anything
about it?

Stefan Siefert


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] image resizing

2001-07-09 Thread Stefan Siefert

There are several possibilities to do this... first PHP has the possibility
to use the GD - Libs (which doesn't support Gif's because of licence
problems). The second (and in my opinion better) posibility is ImageMagick
which are some programs to modify pictures (you have to call them externaly
from your php - scripts) (www.imagemagick.org). I think, I have seen several
Tutorials to do so (PHP/ImageMagick) but on the fly.. I don't find them in
my bookmarks now...

Hope this helps,

Stefan Siefert

-Ursprungliche Nachricht-
Von: Adv. Systems Design [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 9. Juli 2001 16:04
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] image resizing


Is there a way of sizing image resolution on the fly?

TIA

Luis

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] PHP4-ODBC-MSSQL7

2001-07-10 Thread Stefan Siefert

Hi,

I'm not sure about the probeme you have, but if the probleme is based on
ODBC, why do use ODBC? You could also use the Sybase-Ct libs.. should work
also with MSSQL...

Greetings,
Stefan


-Ursprüngliche Nachricht-
Von: Michael Yevdokimov [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 10. Juli 2001 13:09
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] PHP4-ODBC-MSSQL7


Hello Everyone!!

We are making on the project with PHP4 and MSSQL7. Everything is based on
NT4 platform.
Certainly, in this case we are operating by SQL stored procedures.

The question is..

I found some problems while extracting data from database over ODBC
which we need to use to make a bridge between PHP and MSSQL.

For example, we created a table with columns:

col_subj_id int
col_subj_owner_id int
col_subj_last_update timestamp(8)
col_subj_title varchar(512)
col_subj_content text(16)
col_subj_keywords varchar(256)
col_subj_secur int
col_subj_reg_page varchar(128)


Then I try to execute a stored procedure usp_get_subj:

Create Procedure usp_get_subj
(
@subj_id int
)
As
SELECT  *
FROM tbl_subject
WHERE col_subj_id = @subj_id

RETURN

Well, everything is working in Query Analyzer and in ASP but not in
PHP...

If obviously to define the column names like:

SELECT
col_subj_id,
col_subj_owner_id,
col_subj_last_update,
col_subj_title,
col_subj_content,
col_subj_keywords,
col_subj_secur,
col_subj_reg_page
FROM tbl_subject
WHERE col_subj_id = @subj_id

it will not be working either...

But! If to order the columns in the query of the stored procedure by
data types like:

SELECT  col_subj_id, -- int
col_subj_owner_id, -- int
col_subj_secur, -- int
col_subj_last_update, -- timestamp(8)
col_subj_title, -- varchar(512)
col_subj_reg_page, -- varchar(128)
col_subj_keywords, -- varchar(2560
col_subj_content -- text(16)
FROM tbl_subject
WHERE col_subj_id = @subj_id


everything will be working pretty good..


WHY?

Do you have any ideas on this subject? ;-)

Hope to obtain help from your side..

Thank you in advance.

Mike

P.S.

The friend of mine who is ASP programmer just told me that there was such a
problem with the old versions of ODBC. I am not sure but I am afraid that
the PHP's  ODBC support is aimed on that old ODBC driver. Could anyone
advice me anything on this subject please?

?php
 include ('config.inc');

 // script itself:

 $rs_gp = call_stored_procedure(usp_get_subj $QUERY_subj);
 while (fetch_row($rs_gp)) {
 $DB_home_text = get_field($rs_gp, col_subj_content);
 }
 $rs_gp = ;
?


?php
 // config.inc

 // database settings
 $DB_dsn = dsn_sundown;
 $DB_user = sundown;
 $DB_pass = ;
 include ('database.php');
?

?php
 // database.inc

 // call the stored procedure
 function call_stored_procedure($query)
 {
 $conn = get_connection($GLOBALS[DB_dsn], $GLOBALS[DB_user],
$GLOBALS[DB_pass]);
 $result = odbc_exec($conn, $query);
 return $result;
 odbc_close($conn);
 };

 // get the connection handle
 function get_connection($dsn, $user, $pass)
 {
$GLOBALS[conn] = odbc_connect($dsn, $user, $pass);
return $GLOBALS[conn];
 };

 // retrieve the row of data
 function fetch_row($rs)
 {
return odbc_fetch_row($rs);
 };

 // retrieve the field of data
 function get_field($rs, $field)
 {

if (!$rs)
{
$res = No data was returned..;
}

if ($rs)
{

$res = odbc_result($rs, $field);
/*
$no_r = odbc_num_rows($rs);
$no_f = odbc_num_fields($rs);

for ($i=1; $i=$no_f; $i++)
{
$fn = odbc_field_name ($rs, $i);
if ($fn == $field)
{
$res = odbc_result($rs, $field);
break;
}
}
*/
}
return $res;
 };
?


Michael Yevdokimov
Web developer
e-mail: [EMAIL PROTECTED]


Globalocity B.V.
Tel.: +31 (0)70 312 2814
Fax.: +31 (0)70 312 2808
http://www.globalocity.com
e-mail: [EMAIL PROTECTED]




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Row order

2001-07-11 Thread Stefan Doverud

Hello!

I have this little problem sorting a search result by different fieldnames.

I do my search, get a quite impressive amount of variables that I use in my 
MySQL-query, and by default use ORDER BY name.

But I want to be able to klick on different headers to sort like ORDER BY 
$order.

The problem that I encounter is that I lose all the variables from the 
search when I refresh the document. Is it possible to resend all variables 
without inserting them in the A-tag ?
(like A href=find.php?var1=$var1..)

Hopefully someone has a smart solution.. =)

regards

  - Stefan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Linux + Apache + freetds + MsSQL 7.0

2001-07-17 Thread Stefan Kisker

hi there,

i have a 'little' problem:
i am using the system above and select queries work fine.
but i have problems to insert records into the db, even if the
generated queries from the script works fine if you try them with
the microsoft sql manager.
i eliminated all critical fields in the insert operations like
datefields etc.
theres no error message at all and i do not understand why

mssql_query($insertQuery) returns always FALSE
an example:

 INSERT INTO Adressen (Datenbank, Bereich, Quelle, Unterquelle,
Kundennummer, Anrede, Vorname, Nachname, Anschrift, Land, PLZ, Ort,
Newsletter) VALUES ('x', 'x', 'x', 'x', 'x', 'm', 'stefan', 'kisker',
'...', 'D', '1', 'stadt', 'n')

best regards,

stefan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] DB-stored images

2002-11-26 Thread Ohlson Stefan
Title: DB-stored images






Hi!


I have a db where we stores images in the database but I haven't figured out how I display

that image after I've selected it from the table.


I've tried with IMG SRC='' and IMG SRC=""> but $data just return the Select-query:

htmlheadtitle/title/head

body bgcolor=cc text=00 link=ff vlink=ff

BPicture/BBRUL

IMG SRC=''91-29-65480-7''

/UL/body/html


Anyone have an idea what I can do?

Thanks!


Here is the script:

=

?

$handle = ORA_LOGON(something/something,) OR DIE(Unable to connect to database);


print htmlheadtitle/title/head\n;

print body bgcolor=cc text=00 link=ff vlink=ff\n;


if ($type == Author){

 $SqlStatement = SELECT ...;

} else if ($type == Titel){

 $SqlStatement = SELECT ...;

} else if ($type == Picture) {

 $SqlStatement = SELECT PICTURE FROM KATALOGUE WHERE ISBN = '$isbn';

}

$csr = ORA_OPEN($handle) OR DIE(Unable to open data database cursor);

ORA_PARSE($csr, $SqlStatement)OR DIE(Unable to parse query);

ORA_EXEC($csr) OR DIE(Unable to run query);


print B$type/BBRUL\n;

while(ORA_FETCH($csr)){

 $data = "">

 if ($type == Picture){

 print IMG SRC=''\n; 

 } else {

 print LI$data/LI\n;

 }

}


print /UL/body/html\n;


ORA_CLOSE($csr);

ORA_LOGOFF($handle);

?


//Stefan



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


[PHP-DB] php/mysql problem

2002-12-14 Thread Stefan Windt
hi,
i've a problem with php and mysql.
a mysql-server is running on my server on that i can access from 'outside'.
but, if i want to connect to the server with a 'local' php skript (running
on the same server), mysql refuses the login ('acces denied for user
[...]'). the problem is that the login i use in the php skript is exactly
the same as the one i use for connecting from 'outside'.
another strange thing is that the php skript can connect to other mysql-dbs
on other servers...
is it a config-problem ? i've no idea anymore...

Stefan



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




[PHP-DB] Re: passing variables through frames

2003-01-31 Thread Stefan Panayotov
And how does it work?

--

Matt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Nevermind everyone... I found out.

 Thanks

 Matt [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Does anyone know how to pass a variable to a different frame?  For
 example,
  I have a navigation frame, and when you click a link, it opens inside a
  different frame.  Can anyone tell me if there is a way to pass variables
  from the navigation frame to the main frame?  Thanks a lot.
 
  Matt
 
 





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




[PHP-DB] BinaryWrite in PHP?

2003-02-12 Thread Ohlson Stefan
Hi!
I want to let the user to be able to open or save a textdocument with 
text that I create on the fly with some select-statements. 
You know when you click on a button or a link and you get a question
if you what to Open the file or or Save it.

In ASP I can use Response.BinaryWrite, how can I do it in PHP?

Thanks!

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




[PHP-DB] NotesSQL via ODBC in PHP

2003-02-20 Thread Stefan Haas
Has anybody tried to read/write a Lotus Notes Database via ODBC 
(NotesSQL)? I don't even get a valid connection with odbc_connect. With 
other tools (QTODBC) NotesSQL/ODBC is no problem at all. Anything wrong 
with the php ODBC driver in php 4.2.3 under Win2k? Are ther more 
reliable ODBC drivers?

Thanks
Steve


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



[PHP-DB] Re: NotesSQL via ODBC in PHP

2003-02-21 Thread Stefan Haas
Hi MH,

thanks for your comment, but it seems the NotesSQL-driver is basically 
fine, as I vcan access the Notes-DB from QTODBC, Access and others, but 
NOT from php. Do you anybody involved in the ODBC development?

Thanks
Steve

Mh schrieb:
Steve,

I have used NotesSQL succesfully to MS Access and MS SQL, but not with PHP.
The NotesSQL gives you a very basic SQL function set and to my opinion its
not even worth trying it.  This was with Notes 4.5.2.  It could be better in
later versions, I don't know.

ODBC works fine, I have connect PHP to MS Access, MS SQL and and even XLS
files.

MH

Stefan Haas [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Has anybody tried to read/write a Lotus Notes Database via ODBC
(NotesSQL)? I don't even get a valid connection with odbc_connect. With
other tools (QTODBC) NotesSQL/ODBC is no problem at all. Anything wrong
with the php ODBC driver in php 4.2.3 under Win2k? Are ther more
reliable ODBC drivers?

Thanks
Steve








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




[PHP-DB] setcookie

2003-09-05 Thread Ohlson Stefan
Hi!
(I'm using php3 on an apache-server)

I'm doing lika a shoppingcart where the user can put items.
By some reason, when I use setcookie, I can only save between 14-17 posts.

Example: 
 setcookie(items, item1);
 setcookie(items, item2);
 ...
 setcookie(items, item17);

After this it will not save any more items.
It seems to get full..?

NE1 had experience with this?
Or if you have a different and better way to store many 
items on the server for a user they are most welcome!

Thanx!
//Stefan

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



[PHP-DB] php / xml

2003-11-26 Thread stefan bogdan






hello
i'm trying to make a pattern for an economic document using xml
ex
document id='unique' name='document_1'
 fixpart
   field id= 'id' visible='true' name='id' type='numeric' htmltype='textbox'
   /field
   filed id='name' visible='true' name='name' type='select' htmltype='select' sql='select 1,2 from table' value='1'2
   /field
 
 /fixpart
 mobilepart
   ..
 /mobilepart

i need a class that work with this kind of document fast an that can transform it quickly in html
ps: do you think it is agood aproach

thank you
sbogdan
















 IncrediMail - Email has finally evolved - Click Here

[PHP-DB] Fw: informix problem

2004-01-16 Thread stefan bogdan








i have winnt 4.0 servicepack 6 + apache 2.0.47 + php 430 + informix clientfor nt
ilogin demo works fine
sql editor works fine
but when i try to connect to informix via php i'get an error like

Warning: ifx_connect(): E [SQLSTATE=S1 001 SQLCODE=-406]

i have informix server 2000 installed on other (unix) machine.
i have 256MB memory and 20 GB hard (6GB free)
what should i do?

Bogdan

















 IncrediMail - Email has finally evolved - Click Here

Re: [PHP-DB] php-mysql problem

2004-05-13 Thread Stefan Dengscherz
hello,

did you load the mysql module in your php.ini configuration file?
i.e. is the following line there:
extension=mysql.so

regards

On Thu, 13 May 2004 11:47:41 -0400
Jianping Zhu [EMAIL PROTECTED] wrote:

  have redhat 9.0 and Server version: Apache/2.0.40.
   i have installed rpms php-4.2.2-17.2.i386.rpm
php-mysql-4.2.2-17.2.i386.rpm
 
 
After i create a database called mydb and serveral tables in mysql,
I tried to run following testdb.php script
 
 
--
html
body
?php
$db = mysql_connect(localhost, root,xx);
mysql_select_db(mydb,$db);
$result = mysql_query(SELECT * FROM employees,$db);
printf(First Name: %sbr\n, mysql_result($result,0,first));
printf(Last Name: %sbr\n, mysql_result($result,0,last));
printf(Address: %sbr\n, mysql_result($result,0,address));
printf(Position: %sbr\n, mysql_result($result,0,position));
?
/body
/html
---
 
but i got error message with:
http://coopunit.forestry.uga.edu:8080/testdb.php
the error is:
Fatal error: Call to undefined function:
mysql_connect() in /var/www/html/testdb.php on line 13
 
How can Fix this problem? Thanks
 
 -- 
 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] SQLite problem INSERTing string

2004-09-19 Thread Stefan Reimers
Hello,
I am currently experiencing a problem with an INSERT statement in SQLite.
First of all an excerpt from the code:
$val = 127.0.0.1;
$query = INSERT INTO node (uri,name) VALUES (.$val.,'bla');
$db_name = mysqlite;
if($db_hdl = sqlite_open($db_name)){

$db_result = sqlite_query($db_hdl,$query);

}
I get the error message:
Warning: sqlite_query(): near .: syntax error in 
C:\Programme\xampp\htdocs\dipl\testclient\sqlite_test.php on line 10

I tried addslashes (which I know I shouldn't), sqlite_escape_string, any 
variant of quotes etc, I asked google and the searched the news groups 
but with no relevant result, except the insight, that others experience 
the same so long unsolved problem or use a syntax in their tutorials 
that does not work with my code...

As you an see from the error message, I use Windows, Apache, PHP4 with 
SQLite in a 2.8.14 version.

If anyone has a clue, please contact me or just answer.
Thanks in advance
Stefan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: SQLite problem INSERTing string

2004-09-19 Thread Stefan Reimers
Hi again,
first of all thanks for quick suggestions.
After some more testing, I can get more specific:
This might be a more general problem than the . in the error message. 
Even when I use $val = hello I get an equivalent error message

sqlite_query(): near hello
As said, I have done all the quoting stuff, so \' instead of ' was no 
solution either, until I tried double quotes instead of single ones, 
just as M Saleh Eg suggested. So the following statement finally works:

$query = INSERT INTO node (uri,name) VALUES (\$val\,\\);
Just for everybody else:
SQLite does not support the SET statement in INSERTs, so
INSERT INTO table SET attr=val
would not work.
Thx
Stefan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Abstraction Layer....

2004-09-19 Thread Stefan Reimers
PHP knows at least three more:
dba	-	for databases built on Berkeley DB which can be used some 
DB-configurations of MySQL

dbm	-	also very specific for dbm-format, which seems not to be a 
relational one. Some apps seem to use that kind of DB internally.

dbx	-	supports about a dozen types of RDBMS (e.g. PostgreSQL and Oracle, 
furthermore ODBC) and is very nice. I worked with it the last four 
months to write a flexible information system.

Some comparisons can be found at:
http://php.weblogs.com/Compare_PEAR_DB_ADOdb
http://phplens.com/lens/adodb/
Stefan
M Saleh Eg wrote:
Anyone for a list of php abstraction classes?
ADODB, PEAR::DB... any others? or better?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: PHP - FOXPRO

2004-09-21 Thread Stefan Reimers
The following excerpt is a result found on the internet.
I am not the author of that text, but as it might help, here you go:
Here's the first part:

http://php.weblogs.com/com_php

Using COM from PHP to get to the ADO object model.  ADO is an
abstraction of OLE DB funtionality.

The second part is connecting to an OLEDB Provider for VFP:

http://fox.wikis.com/wc.dll?Wiki~VFP_OleDB_Provider

That should get you going.
Good luck,
Stefan Reimers
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: PostgreSQL

2004-09-29 Thread Stefan Reimers
M Saleh Eg wrote:
Any Idea about where I'd get an installer version of PostgreSQL for windows?
Wow, I recently had a project working on PostgreSQL.
For local development we installed cygwin on WIN and tried to keep that 
working.
How long does that installer exist?
Nevertheless, thx for the link, I reported it to my successors on the 
project.

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


[PHP-DB] Re: php_mysql.dll fails to load

2004-10-27 Thread Jose Stefan
It appears as if the php_mysql.dll  module has problems loading the
libmysql.dll file.
Setting the PHP dir to the system path var did NOT work for me.

However, these options did:
a) copy the bundled libmysql.dll to the windows system32 folder.
b) OR, copy the bundled libmysql.dll to apache's BIN folder.
c) OR, copy the bundled libmysql.dll to apache's root folder.

I'm currently using option C, but I would prefer not having to copy DLL
files across my system. Has anyone found a better solution?

My Server:
* Microsoft WindowsXP SP2
* MySQL 4.0.21
* Apache 2.0.52
* PHP 5.0.2

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



[PHP-DB] Re: php_mysql.dll fails to load

2004-10-27 Thread Jose Stefan
It appears as if the php_mysql.dll  module has problems loading the
libmysql.dll file.
Setting the PHP dir to the system %path% var did NOT work for me.

However, these options did:
a) copy the bundled libmysql.dll to the windows system32 folder.
b) OR, copy the bundled libmysql.dll to apache's BIN folder.
c) OR, copy the bundled libmysql.dll to apache's root folder.

I'm currently using option C, but I would prefer not having to copy DLL
files across my system. Has anyone found a better solution?

My Server Includes:
* Microsoft WindowsXP SP2
* MySQL 4.0.21
* Apache 2.0.52
* PHP 5.0.2

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



Re: [PHP-DB] Re: [EMAIL PROTECTED] November 2, 2004

2004-11-02 Thread Stefan Reimers
To end up with this discussion:
It is a piece of truth that the whole world is curious on what will 
happen during ( ;-) )and after the voting in the US but as the main part 
of the world has no effect on the election by using php this posting was 
obviously misplaced. Worst of all, this posting started a discussion 
WHICH IS MISPLACED ITSELF IN THE PHP.DB LIST.

Gh wrote:
and by the way the main reason we have problems  in America 

  * People with out health insurance
[snip]
THAT is one of the major reasons the rest of the world gets p*d of
Americans ;)
--
Lester Caine
-
L.S.Caine Electronic Services

--
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: Newbie Setup Trouble

2005-02-07 Thread Stefan Reimers
Hi!
first of all, the fatal error indicates that the mysql extension is 
missing or just disabled. To find out what's wrong check for the file 
php_mysql.(so|dll) [using *nix|Windows] in the php-extension directory. 
If present, then open the php.ini file and search for the string 
extension=php_mysql and delete the ; in front of it, if present. 
Stop and start webserver and try again.

Alternatively you should install XAMPP or similar which installs Apache, 
PHP and MySQL at once. This makes life easier for beginners.

Stefan
Mike Rondeau wrote:
  Hello,
 I have just begun study of using PHP, MySQL and Apache server. Right now 
I'm following a book, PHP and MySQL For Dummies and am having trouble 
already. I must be a REAL dummy! I have installed all 3 programs but 
something is not right somewhere. Being so new to this I am having a real 
time trying to figure out which program is messed up. Certain things work, 
but others don't.

 For instance, my book told me how to make a phpinfo.php page, which works 
fine. But it also tells me to create some other pages to test if PHP and 
MySQL are working or not. I followed the scripts provided exactly but keep 
getting syntax errors, even though the script is just what the authors 
wrote. For instance, it said to make a page and call it mysql_up.php. Here's 
the script for it:

html
headtitleTest MySQL/title/head
body
!-- mysql_up.php --
?php
$host=localhost;
$user=blablablabla;
$password=blablabla;
mysql_connect($host,$user,$password);
$sql=show status;
$result = mysql_query($sql);
if ($result == 0)
{
   echo bError  . mysql_errno() . : 
 . mysql_error() . /b;
}
else
{
?
!-- Table that displays the results --
table border=1
  trtdbVariable_name/b/tdtdbValue/b
  /td/tr
  ?php
for ($i = 0; $i  mysql_num_rows($result); $i++) {
  echo TR;
  $row_array = mysql_fetch_row($result);
  for ($j = 0; $j  mysql_num_fields($result); $j++)
  {
echo TD . $row_array[$j] . /td;
  }
  echo /tr;
}
  ?
/table
?php } ?
/body/html

But when I open it in my browser I get this error:
Fatal error: Call to undefined function mysql_connect() in C:\Program 
Files\Apache Group\Apache2\htdocs\mysql_up.php on line 10

Could anyone of you smart people point me in the right direction? I'd be 
pulling my hair out if I had any left :)


 I can't make any progress with this study until I know my 3 programs are 
talking to eachother properly, but my book gives no info on this error.

 Thanks a millionfold for any advice, and I appologise for the length of 
this post.

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


[PHP-DB] Re: Problem with an update after an insert: MySQL

2005-02-08 Thread Stefan Reimers
It would make things easier if you could determine the error, so try to 
use mysql_error after all your mysql_queries, not just after the first one.

Stefan
[EMAIL PROTECTED] wrote:
I'm having trouble with having trouble with doing an update after doing an  
insert on and a select on a table. The order of execution is:
 
 $result = mysql_query(select token from  tokenuserid where  userid = 
'$none' );
if (!$result)
echo  mysql_error();
 
  $numresult = mysql_num_rows($result);
$row =  mysql_fetch_row($result);
$gotToken =  $row[0];

$generatedToken =  date(YmdHis);
$result = mysql_query(insert into tokenuserid  values ('$generatedToken', 
'$none'));
 
  $result = mysql_query(update tokenUserid set userid = '$userid'  where 
token = '$gotToken');
if (!$result)
echo  can't find user; 
 
I can't get this update to take. Actually, I can get this to work on one  
implementation of this database and on the next implementation of this it  
doesn't work. returning the error after the update. The MySQL version is  3.23.52. 
Is it because I have a capital U in the name tokenUserid in the update  
statement? I could believe this as a reason since the table is defined as:  
tokenuserid - (without any caps). If this is the problem then why does it occur  in one 
implementation and not the other?

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


[PHP-DB] Re: Is there anything non commercial pdf lib to create PDF file from PHP ?

2005-02-10 Thread Stefan Reimers
Try FPDF on http://www.fpdf.org/
Stefan
Santoso Berkah wrote:
Dear Friends,
Is there anything non commercial pdf library (stable
release) to create PDF file from PHP except PHPlib.com
?
I've browsed this site and it costed Euro 450.
Can you help me please ?
Best regards,
[EMAIL PROTECTED]
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] History of MySQL support in PHP

2005-03-19 Thread Stefan Reimers
Hi list,
can anyone tell me, when PHP originally started the MySQL support? I 
downloaded the php 3.0.17 version from php.net and it already supports 
MySQL.

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


Re: [PHP-DB] History of MySQL support in PHP

2005-03-19 Thread Stefan Reimers
The changelog reaches back to the first beta of PHP4
Forest Liu wrote:
I think you can check the changelog on www.php.net
On Sat, 19 Mar 2005 14:13:44 +0100, Stefan Reimers
[EMAIL PROTECTED] wrote:
Hi list,
can anyone tell me, when PHP originally started the MySQL support? I
downloaded the php 3.0.17 version from php.net and it already supports
MySQL.
Thx in advance
Stefan
--
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] History of MySQL support in PHP

2005-03-19 Thread Stefan Reimers
Indeed, the book writing is no bad guess, but with slightly different 
focus than PHP ancestry. But wondering how long mysql is supported is 
more or less personal interest.

Thx to both of you for answering and greetings from Germany to China and 
California, USA

Stefan Reimers
___
Forest Liu wrote:
Maybe he is writing a book Leading to Creativity: the road of PHP and
its father
haha
just joking
my pleasure to read the post from Mr.Lerdorf 
and best wishes from all Chinese PHP programer.

On Sat, 19 Mar 2005 07:41:55 -0800, Rasmus Lerdorf [EMAIL PROTECTED] wrote:
The actual code for the first MySQL extension was just a search and
replace of msql-mysql in the original msql extension I wrote before
that.  I found 1995'ish documentation for that the other day:
  http://lerdorf.com/php/msql.html
And that extension was based on the original msql support in PHP version
1 dating back to around March or April of 1995.  You can see that code
in the PHP 1.0.8 tarball located at http://museum.php.net.
Unfortunately I didn't use CVS in the early days so we don't have
revision history going back that far.
But I am curious, why do you want to know?
-Rasmus
--
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] class of objects created by mysqli_result-fetch_object

2006-02-04 Thread Stefan Reimers

Hi,

I fetched some data from my MySQL database into objects. These are of 
class stdClass.
Now I wonder about the sense of having objects without methods defined. 
In fact, I cannot benefit from any of the OO advantages (namely property 
protection, controlled method calls on class properties) unless I wrap 
the properties of these instances of stdClass to a custom class, right?


Is there any way to fetch MYSQL data to a suitable class other than 
stdClass - suitable in the sense of: the custom class has all properties 
which are fetched from db.


thx
Stefan

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



Re: [PHP-DB] PDO user question

2012-09-09 Thread Stefan Wixfort

Hi Jim


I've had some success with querying using pdo and prepared statements as
well.  One thing that I'm curious about is

How does one handle the need to get the number of rows returned by a
Select?  The documentation is very clear that PDO doesn't return that
value for a Select statement (depending upon driver?) and there were a
couple of solutions that made no sense to me.  There was even one that
did a completely separate query just to get the row count which makes
even less sense.


I believe you are referring to SELECT COUNT(*)...
Because I couldn't find a different way I use that.

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