[PHP] sql looping problem??

2001-04-03 Thread Wade Halsey
Hi I have the following code /*number of times to run*/ $NumCases = $HTTP_POST_VARS['txtNumCases']; /*execute the sql*/ $sqlLargeRequest = sqlexecute($LargeRequest); for ($val = 0; $val $NumCases; ++$val){ if ($val $NumCases) { $details = sqlFetchObject( $sqlLargeRequest ); $AccNo =

Re: [PHP] sql looping problem??

2001-04-03 Thread Plutarck
It's probably not the cause of your problem (I know little to nothing about Interbase), but why the if... loop in your code? Your if: if ($val $NumCases) does the same thing as your for: for ($val = 0; $val $NumCases; ++$val) Unless of course you wanted it that way... -- Plutarck

[PHP] SQL : multiple SELECT and missing rows.

2001-04-02 Thread Maxim Maletsky
Hello Guys, I have a (very simple?) SQL question. I'm more then sure the answer to it is whether "just do this..." or "It's impossible man, how could you even get that into your mind..." I have this database design: (it's more complex of course, but you get an idea) Table

Re: [PHP] SQL : multiple SELECT and missing rows.

2001-04-02 Thread Steve Werby
"Maxim Maletsky" [EMAIL PROTECTED] wrote: As you can see, the main data is in 'accounts', the 'addresses.ID' is UNIQUE and corresponds to 'accounts.ID'. The fact is that not every account has an address registered with it. snip FROM accounts, addresses You're doing a straight join. You

Re: [PHP] sql problem

2001-03-26 Thread Brett Bandy
InterBase isn't real good with subselects. Try using a join instead: select e.empname from employer e join badclient b on e.empno = b.employercode where b.pesal = '$Persal'; Brett ""Wade Halsey"" [EMAIL PROTECTED] wrote in message

[PHP] sql problem

2001-03-23 Thread Wade Halsey
Hi ppl ("select empname from employer where empno = (select employercode from badclient where pesal = '$Persal')") Could anyone help me out with the syntax? Im running an interbase db and php4.04 Thanks Wade

RE: [PHP] sql problem

2001-03-23 Thread Jeff Armstrong
condition in the where clause. Regards Jeff -Original Message- From: Wade Halsey [mailto:[EMAIL PROTECTED]] Sent: Friday, March 23, 2001 11:25 AM To: [EMAIL PROTECTED] Subject: [PHP] sql problem Hi ppl ("select empname from employer where empno = (select employercode from badc

[PHP] SQL statement in PHP

2001-02-16 Thread Matt Davis
Can anybody help with this If I put the following statement in PHP my browser tells me that there is an error on the line. //create sql statement $sql = "select Business_Name,Trading_Details where Business_Type = "Consultancy" and Bassingbourn != "0" from Main"; If I remove where

Re: [PHP] SQL statement in PHP

2001-02-16 Thread William N. Zanatta
Matt, Maybe the mistake is at the quotes... Just replace the double quotes inside the select statement by single quotes... Try something like: snip code $sql = "select Business_Name,Trading_Details where Business_Type='Consultancy' and Bassingbourn != '0' from Main"; /snip code

[PHP] SQL Statments?

2001-02-05 Thread Jonathan Sharp
If I have a text file with all my sql statements (from like say mysqldump) what's the easiest way of passing them to mysql? I'm on RedHat6.2 with mysql 3.22.32 Thanks, -Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] SQL Statments?

2001-02-05 Thread Jason Brooke
If I have a text file with all my sql statements (from like say mysqldump) what's the easiest way of passing them to mysql? I'm on RedHat6.2 with mysql 3.22.32 Thanks, -Jonathan I'm not sure about the easiest way, but definitely an easy way would be to simply do: cat filename | mysql

Re: [PHP] SQL Statments?

2001-02-05 Thread David Robley
On Tue, 6 Feb 2001 11:49, Jonathan Sharp wrote: If I have a text file with all my sql statements (from like say mysqldump) what's the easiest way of passing them to mysql? I'm on RedHat6.2 with mysql 3.22.32 Thanks, -Jonathan Assuming you want to recreate tables from the dump and assuming

Re: [PHP] SQL question

2001-01-31 Thread Daniel Grace
"John LYC" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi all, does mysql support this? select * from tablename where id in (select id from table2 where cond) thanks No. MySQL does not support so-called sub-selects. Here's an easy workaround in PHP:

[PHP] SQL question

2001-01-30 Thread John LYC
hi all, does mysql support this? select * from tablename where id in (select id from table2 where cond) thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

[PHP] SQL Server DB to mySQL DB

2001-01-25 Thread Jason Bouwmeester
Is there an easy way to do this? I know that SQL Server can export a comma delimited file, can mySQL import this? I imagine the PHP will be easy to modify as long as the field names are the same. Thanks, jb Jason Bouwmeester New Media Consultant InterVisual Suite 200, 709 - 11th Ave SW

Re: [PHP] SQL Server DB to mySQL DB

2001-01-25 Thread Pavel Kalian
25, 2001 4:44 PM Subject: [PHP] SQL Server DB to mySQL DB Is there an easy way to do this? I know that SQL Server can export a comma delimited file, can mySQL import this? I imagine the PHP will be easy to modify as long as the field names are the same. Thanks, jb Jason Bouwmeester

Re: [PHP] SQL Server DB to mySQL DB

2001-01-25 Thread Christopher Allen
Just did this to a 65mb fixed width file. What I did was get it into a csv file via perl :) Then I created the db table. Then I used: load data infile "/file.csv" into table blah fields terminated by ',' ; then go ahead and create any indexes etc... !works slick! Is there an easy way to do

Re: [PHP] PostgreSQL + PHP + SQL warning messages

2001-01-25 Thread Martin A. Marques
El Jue 25 Ene 2001 16:36, Evelio Martinez escribi: Hi! Is there any way to get the equivalent sqlca.sqlcode value of informix in PostgreSQL from php ? I would like to use the sqlcode to print the messages in Spanish. The problem is that informix puts in an array (sort of) all the info

<    2   3   4   5   6   7