[PHP-DB] selecting a constant or label in php

2003-12-03 Thread Jon Davis
Sorry for another newbie question, I'm learning.

In Sybase I can do:

select COMM_REGIONID , count(1) from COMM_REGIONID where PHYSICAL_ID is 
null
select COMM_TKGRP , count(1) from COMM_TKGRP where PHYSICAL_ID is null

I get parsing errors when putting it in this:

$result = sybase_query(select COMM_REGIONID , count(1) from COMM_REGIONID 
where PHYSICAL_ID is null
   select COMM_TKGRP , count(1) from 
COMM_TKGRP where PHYSICAL_ID is null , $server_sybase);

How can I hardcode COMM_REGIONID and COMM_TRKGRP?

_
Wonder if the latest virus has gotten to your computer? Find out. Run the 
FREE McAfee online computer scan! 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: [PHP-DB] selecting a constant or label in php

2003-12-03 Thread Jon Davis
COMM_REGIONID and COMM_TRKGRP are not columns in the tables.  They are the 
actual table names.  I want the count of the PHYSICAL_ID where it is NULL.  
I need to do this for multiple table so I want to hardcode the tablename and 
then have the count:

 ---
COMM_TKGRP0
COMM_REGIONID 0
using COMM_REGIONID, 'COMM_REGIONID' and \COMM_REGIONID\ all fail with:

Warning: sybase_query() [http://www.php.net/function.sybase-query]: Sybase:  
Server message:  COMM_REGIONID not found. Specify owner.objectname or use 
sp_help to check whether the object exists (sp_help may produce lots of 
output).

It's not found because it's not a column.  I just want it in there so when I 
insert it into another table I will know which count applies to which table. 
 Everything I try, gets an error.

Sorry, I should have mentioned what COMM_REGIONID was first.


From: Jon Davis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] selecting a constant or label in php
Date: Wed, 03 Dec 2003 09:39:33 -0600
Sorry for another newbie question, I'm learning.

In Sybase I can do:

select COMM_REGIONID , count(1) from COMM_REGIONID where PHYSICAL_ID is 
null
select COMM_TKGRP , count(1) from COMM_TKGRP where PHYSICAL_ID is null

I get parsing errors when putting it in this:

$result = sybase_query(select COMM_REGIONID , count(1) from 
COMM_REGIONID where PHYSICAL_ID is null
   select COMM_TKGRP , count(1) from 
COMM_TKGRP where PHYSICAL_ID is null , $server_sybase);

How can I hardcode COMM_REGIONID and COMM_TRKGRP?

_
Wonder if the latest virus has gotten to your computer? Find out. Run the 
FREE McAfee online computer scan! 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get holiday tips for festive fun. 
http://special.msn.com/network/happyholidays.armx

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


[PHP-DB] Oracle to Sybase PHP question

2003-11-25 Thread Jon Davis
Hello PHP gurus,

I have just started to learn PHP, since I have inherited some previous PHP 
scripts that I must maintain.

My question is this:  I have to write a script that gets data from a view in 
Oracle.  I then need to insert that data into a Sybase database.  Can this 
be done?  This will run every 5 minutes.  The view could produce 0 rows of 
data or multiple rows of data, so I guess I would need to use an array of 
some kind.

Anyone have any ideas that could point me in the right direction?

Thanks
Jion
_
From the hottest toys to tips on keeping fit this winter, you’ll find a 
range of helpful holiday info here.  
http://special.msn.com/network/happyholidays.armx

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