Ryan,
Thank you for your reply.
I tried this, but it still didn't work. Any "insert",
"update" or "delete" statement will cause failure even
it's the only query in my program. "select" is always
fine. Anyone have any idea about this?
Wen
--- Ryan <[EMAIL PROTECTED]> wrote:
> Here's a rundown of some things you can try
> changing, I don't know if it
> will help, but we'll give it a shot.
>
> Basically, I removed all the $conn strings from
> everything but the
> sybase_select_db statement. I know with MSSQL and
> MySQL you only need
> to specifiy the connect string once, and it will
> stay constant until the
> script dies. I have a feeling that may be the
> problem because you're
> re-specifying the connect statement but not the
> sybase_select_db
> statement. Give that a shot and see what it does
> for you.
>
> Ryan
>
> <?
> $conn=sybase_connect("xxx","xxx","xxxxxxxx");
> sybase_select_db("pubs",$conn);
>
> $result=sybase_query("select * from authors")
> or die("query1 failed");
> sybase_free_result($result);
>
> $result=sybase_query("insert into pub_info
> values(0001,null,'test')") or
> die("query2 failed");
> sybase_free_result($result);
>
> $result=sybase_query("select * from pub_info");
> sybase_free_result($result);
> ?>
>
>
>
>
> -----Original Message-----
> From: jong jong [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 03, 2001 5:44 PM
> To: Ryan Marrs
> Subject: RE: [PHP-DB] sybase_query()
>
> I tried it again without '@', but it didn't post me
> any error message.
> Here is some values from php_info():
> Configuration
> PHP Core
> Directive Local value Master value
> display_errors On On
> display_startup_errors
> Off Off
> doc_root no value no value
> enable_dl On On
> error_append_string Off Off
> error_log no value no value
> error_prepend_string
> Off Off
> error_reporting 2039 2039
>
> Are they enough to display the error messages? But
> I
> see nothing except "Query2 failed" on my browser.
>
> BTW, sybase_xxx() and mssql_xxx() work same on my
> code.
>
> Thanks,
> Wen
>
> --- Ryan Marrs <[EMAIL PROTECTED]> wrote:
> > Get rid of the error suppression (@) before the
> > Sybase query sets, and it
> > should post you an error message as to why it's
> > failing. And another
> > question, why are you running Sybase for MSSQL?
> >
> > Ryan Marrs
> >
> >
> > -----Original Message-----
> > From: jong jong [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 03, 2001 4:29 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] sybase_query()
> >
> > Please take a look into my simple php code. Why
> > does
> > this program die on "query2 failed" but a new
> record
> > acturally is inserted into table "pub_info"?
> >
> > I asked this question last week, but didn't get
> any
> > answer so far. If you don't see any problem in
> > there,
> > please let me know. This is my last try!
> >
> > Please help me!
> >
> > <?
> > $conn=sybase_connect("xxx","xxx","xxxxxxxx");
> > sybase_select_db("pubs",$conn);
> >
> > $result=@sybase_query("select * from
> authors",$conn)
> > or die("query1 failed");
> > sybase_free_result($result);
> >
> > $result=@sybase_query("insert into pub_info
> > values(0001,null,'test')",$conn) or die("query2
> > failed");
> > sybase_free_result($result);
> >
> > $result=@sybase_query("select * from
> > pub_info",$conn);
> > sybase_free_result($result);
> > ?>
> >
> > working environment: SunOS5.8, php4, freetds,
> MSSQL
> > Server
> >
> > Thanks,
> > jongjong
> >
> > __________________________________________________
> > 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]
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
__________________________________________________
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]