[PHP-DB] Re: odbc problem

2007-03-11 Thread Haydar Tuna
Hello,
  I faced same problems. My table had many rows but I couldn't run 
odbc_num_fields. It return -1 result. I looked PHP help file. But I get rows 
with odbc_fetch_row() function. My operating system was Windows 2003. I 
think, there is a bug odbc_num_fields function in Windows 2003 operating 
systems becuase in Windows 2003 , when I run PHP with IIS I faced many 
problems. :)


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


""bedul"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> - Original Message -
> From: "gunawan" <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, March 12, 2007 11:46 AM
> Subject: odbc problem
>
>
>> i have this warning.. i don't know what the meaning
>> 
>> Using odbc_num_fields
>>
>> Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State 
>> :
>> S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
>> General server error, SQL state S1000 in SQLExecDirect in
>> C:\dokumen_php\tes\odbc\c-6.php on line 12
>> -
>>
>> this is my script.. i know this is simple..
>> 
>> Using odbc_num_fields >
>> //include "c-config.php";
>> $DBname = 'medtrak2'; //'MSAccessDriver'
>> $DBuser = "_system";
>> $DBpass = "sys";
>>
>> $con = odbc_connect($DBname, $DBuser, $DBPass);
>> if ($con)
>> {
>>   $txt.= "odbc connected
>>  ";
>>   $sql =  "select * from PA_Adm";
>>   //this function will execute the sql satametn in
>>   //correspondance to the table in the db
>>  $exec = odbc_exec($con, $sql);
>>   //int odbc_num_fields ( resource result_id )
>>  $n= odbc_num_fields($exec); //$Query_ID);
>>
>>  $txt.="\ntotal column=".$n;
>> }
>>
>> //$txt.= readThisFile($filename);
>>
>> print $txt;
>> ?>
>>
>> ---
>> 

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



[PHP-DB] Re: php with IIS

2007-03-11 Thread Haydar Tuna
Hello,
   if your operating system is windows XP, you can run PHP and IIS 
without any problems. if your operating system is windows 2003, you can face 
some problems becuase microsoft change user privileges in Windows 2003 but 
if you work more in Windows 2003 operating systems, you can solve problems. 
You can run PHP with IIS two types (ISAPI and CGI) . You can find any 
document www.php.net web address or internet about this topics. :)


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


""Harpreet"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Is there a way to run our PHP pages through Microsoft's IIS?

Regards,
Harpreet Kaur

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



[PHP-DB] Re: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: "IMRAN" <[EMAIL PROTECTED]>
To: ""bedul"" <[EMAIL PROTECTED]>
Cc: "php.db" 
Sent: Monday, March 12, 2007 1:03 PM
Subject: Re: odbc problem


> Is odbc_num_fields return any value ?
> You can disable the warnings in php.ini file.
>
> Please let me know if that helps...
nope.. no value has been return.. but it kind strange
Using odbc_field_len
No rows found
odbc connected
total column=268

it return the column but not the value inside?? strange??
the more strange was it should return 300++??

i'm curious about this warning line

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
S1000][Native Code 400] [D:\Aplikasi\xampp\apache\bin\apache.exe] General
server error, SQL state S1000 in SQLExecDirect in
D:\Aplikasi\xampp\htdocs\tes\odbc\c-4.php on line 11
===
"General server error, SQL "
any clue anyone.. i believe this the problem begin..

fyi.. i already close after open the database. but nothing good happen.

thx to anyone reply..


> - Original Message -
> From: ""bedul"" <[EMAIL PROTECTED]>
> Newsgroups: php.db
> To: 
> Sent: Monday, March 12, 2007 10:21 AM
> Subject: Fw: odbc problem
>
>
> >
> > - Original Message -
> > From: "gunawan" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Monday, March 12, 2007 11:46 AM
> > Subject: odbc problem
> >
> >
> > > i have this warning.. i don't know what the meaning
> > > 
> > > Using odbc_num_fields
> > >
> > > Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché
ODBC][State
> :
> > > S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
> > > General server error, SQL state S1000 in SQLExecDirect in
> > > C:\dokumen_php\tes\odbc\c-6.php on line 12
> > > -
> > >
> > > this is my script.. i know this is simple..
> > > 
> > > Using odbc_num_fields  > >
> > > //include "c-config.php";
> > > $DBname = 'medtrak2'; //'MSAccessDriver'
> > > $DBuser = "_system";
> > > $DBpass = "sys";
> > >
> > > $con = odbc_connect($DBname, $DBuser, $DBPass);
> > > if ($con)
> > > {
> > >   $txt.= "odbc connected
> > >  ";
> > >   $sql =  "select * from PA_Adm";
> > >   //this function will execute the sql satametn in
> > >   //correspondance to the table in the db
> > >  $exec = odbc_exec($con, $sql);
> > >   //int odbc_num_fields ( resource result_id )
> > >  $n= odbc_num_fields($exec); //$Query_ID);
> > >
> > >  $txt.="\ntotal column=".$n;
> > > }
> > >
> > > //$txt.= readThisFile($filename);
> > >
> > > print $txt;
> > > ?>
> > >
> > > ---
> > >
>
>

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



[PHP-DB] Re: odbc problem

2007-03-11 Thread IMRAN
Is odbc_num_fields return any value ?
You can disable the warnings in php.ini file.

Please let me know if that helps...

- Original Message - 
From: ""bedul"" <[EMAIL PROTECTED]>
Newsgroups: php.db
To: 
Sent: Monday, March 12, 2007 10:21 AM
Subject: Fw: odbc problem


>
> - Original Message -
> From: "gunawan" <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, March 12, 2007 11:46 AM
> Subject: odbc problem
>
>
> > i have this warning.. i don't know what the meaning
> > 
> > Using odbc_num_fields
> >
> > Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State
:
> > S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
> > General server error, SQL state S1000 in SQLExecDirect in
> > C:\dokumen_php\tes\odbc\c-6.php on line 12
> > -
> >
> > this is my script.. i know this is simple..
> > 
> > Using odbc_num_fields  >
> > //include "c-config.php";
> > $DBname = 'medtrak2'; //'MSAccessDriver'
> > $DBuser = "_system";
> > $DBpass = "sys";
> >
> > $con = odbc_connect($DBname, $DBuser, $DBPass);
> > if ($con)
> > {
> >   $txt.= "odbc connected
> >  ";
> >   $sql =  "select * from PA_Adm";
> >   //this function will execute the sql satametn in
> >   //correspondance to the table in the db
> >  $exec = odbc_exec($con, $sql);
> >   //int odbc_num_fields ( resource result_id )
> >  $n= odbc_num_fields($exec); //$Query_ID);
> >
> >  $txt.="\ntotal column=".$n;
> > }
> >
> > //$txt.= readThisFile($filename);
> >
> > print $txt;
> > ?>
> >
> > ---
> >

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



Re: [PHP-DB] Fw: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: "Chris" <[EMAIL PROTECTED]>
To: "bedul" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, March 12, 2007 12:00 PM
Subject: Re: [PHP-DB] Fw: odbc problem


> bedul wrote:
> > - Original Message -
> > From: "gunawan" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Monday, March 12, 2007 11:46 AM
> > Subject: odbc problem
> >
> >
> >> i have this warning.. i don't know what the meaning
>
> http://www.php.net/manual/en/function.odbc-error.php
>
> Use the error function and work out what it's complaining about.
>
it return
 Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
General server error, SQL state S1000 in SQLExecDirect in my script

i don't understand what happen??
apache error?? i already restart the apache

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



Re: [PHP-DB] Fw: odbc problem

2007-03-11 Thread Chris

bedul wrote:

- Original Message -
From: "gunawan" <[EMAIL PROTECTED]>
To: 
Sent: Monday, March 12, 2007 11:46 AM
Subject: odbc problem



i have this warning.. i don't know what the meaning


http://www.php.net/manual/en/function.odbc-error.php

Use the error function and work out what it's complaining about.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



[PHP-DB] Fw: odbc problem

2007-03-11 Thread bedul

- Original Message -
From: "gunawan" <[EMAIL PROTECTED]>
To: 
Sent: Monday, March 12, 2007 11:46 AM
Subject: odbc problem


> i have this warning.. i don't know what the meaning
> 
> Using odbc_num_fields
>
> Warning: odbc_exec() [function.odbc-exec]: SQL error: [Caché ODBC][State :
> S1000][Native Code 400] [C:\ProgramFiles\xampp\apache\bin\apache.exe]
> General server error, SQL state S1000 in SQLExecDirect in
> C:\dokumen_php\tes\odbc\c-6.php on line 12
> -
>
> this is my script.. i know this is simple..
> 
> Using odbc_num_fields 
> //include "c-config.php";
> $DBname = 'medtrak2'; //'MSAccessDriver'
> $DBuser = "_system";
> $DBpass = "sys";
>
> $con = odbc_connect($DBname, $DBuser, $DBPass);
> if ($con)
> {
>   $txt.= "odbc connected
>  ";
>   $sql =  "select * from PA_Adm";
>   //this function will execute the sql satametn in
>   //correspondance to the table in the db
>  $exec = odbc_exec($con, $sql);
>   //int odbc_num_fields ( resource result_id )
>  $n= odbc_num_fields($exec); //$Query_ID);
>
>  $txt.="\ntotal column=".$n;
> }
>
> //$txt.= readThisFile($filename);
>
> print $txt;
> ?>
>
> ---
>

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



Re: [PHP-DB] auto_increment command

2007-03-11 Thread Micah Stevens

Actually you can. As Bastien pointed out:

ALTER TABLE tbl AUTO_INCREMENT = 1;

This may screw with your indexes though, if you have a primary indexed, 
or unique indexed row, and you set this to 1, mysql >>MAY<< try and 
insert conflicting values. I've never done this so I have no idea how 
this is handled by the server, but I suspect you'll just get an error.


-Micah

On 03/11/2007 06:55 PM, bedul wrote:

u can't
- Original Message -
From: "Ron Piggott" <[EMAIL PROTECTED]>
To: "PHP DB" 
Sent: Monday, March 12, 2007 7:52 AM
Subject: [PHP-DB] auto_increment command


  

I am not sure if that last e-mail went through or not.  I am wondering
how to re-set the auto_increment field back to 1 in one of my tables.
Ron



there no such thing reset auto_increment
if you need the reset.. there were way to do that.
rename the table.. then take query to build it
create new table and tralalla.. u have reset it.

fyi. if inside the table already have a data were id was 100.. the next id
must be 101..
btw.. if you want to make your table more clean (i said about.. how random
the num).. there is a way.
what reason u wanna do that??

  


Re: [PHP-DB] auto_increment command

2007-03-11 Thread bedul
u can't
- Original Message -
From: "Ron Piggott" <[EMAIL PROTECTED]>
To: "PHP DB" 
Sent: Monday, March 12, 2007 7:52 AM
Subject: [PHP-DB] auto_increment command


> I am not sure if that last e-mail went through or not.  I am wondering
> how to re-set the auto_increment field back to 1 in one of my tables.
> Ron

there no such thing reset auto_increment
if you need the reset.. there were way to do that.
rename the table.. then take query to build it
create new table and tralalla.. u have reset it.

fyi. if inside the table already have a data were id was 100.. the next id
must be 101..
btw.. if you want to make your table more clean (i said about.. how random
the num).. there is a way.
what reason u wanna do that??

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



[PHP-DB] auto_increment command

2007-03-11 Thread Ron Piggott
I am not sure if that last e-mail went through or not.  I am wondering
how to re-set the auto_increment field back to 1 in one of my tables.
Ron


RE: [PHP-DB] auto_increment

2007-03-11 Thread Bastien Koert

are you dumping the data or you just want to reset?

issuing the 'empty table' command in phpmyadmin will do that

or you can do

ALTER TABLE tbl AUTO_INCREMENT = 100;

bastien



From: Ron Piggott <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: PHP DB 
Subject: [PHP-DB] auto_increment
Date: Sun, 11 Mar 2007 20:01:30 -0400

How do I reset the auto_increment value to 1 in table abc?  Ron


_
This March Break, Have An Outdoor Fun-For-All! 
http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!147


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



[PHP-DB] auto_increment

2007-03-11 Thread Ron Piggott
How do I reset the auto_increment value to 1 in table abc?  Ron


Re: [PHP-DB] Creating drop down lists

2007-03-11 Thread Bruce Cowin
Your select is only selecting the field 'root' but then you're trying to get 
the field 'username' in your while loop.  So, you can add username to your 
select (or change it to *):

select root, username from training
select * from training



Regards,

Bruce

>>> Scott <[EMAIL PROTECTED]> 11/03/2007 12:33:37 a.m. >>>
Hi everyone!

I would like to create a drop down list with the info in my database.

I would also like to have more options so it will filter down to many
rows of data displayed then filtered down to a few rows of data that
said user is looking for.

Kind of like select a state then in the next box you can select the city.

but first thing is first.

I have tried a few things out there that I searched for but everything
I tried it will not populate the drop down list with the data in my
database.

So I know it somewhere along the lines of:

$query = mysql_query("SELECT root FROM training");
echo "";
while ($r = mysql_fetch_array($query))
{
$user = $r["username"];
echo "$user";
}
echo "";

or something like that but nothing populates

What is the proper code to get this done to populate and display what
I select from the drop down menu?

Say my DB name is: TUBA
My table name is: FLUTE

and I have xxx amounts of rows to filter through with three columns in
my mysql db.

Does that all make sense?

Thanks in advance!

You all rock!!

sb

-- 
AOL IM: Jestrix1

-- 
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