Re: [PHP-DB] Retrieving Rows - Can I Change The Order?

2001-07-25 Thread Paul Burney
on 7/25/01 11:46 PM, Dave Watkinson at [EMAIL PROTECTED] wrote: > By the way, I know I can be explicit by SELECTing each column by name, but > I'ds rather use a SELECT * fror this partucular instance. That would be better, of course. :) Another thing you can do is a mysql_fetch_array() and the

[PHP-DB] Retrieving Rows - Can I Change The Order?

2001-07-25 Thread Dave Watkinson
Hi all I think this should be a nice easy one... I get a select * query, then I start checking what values are in certain columns for a given row. Usually I do something like if ($row[3] == "1") { // do something } else { // do something

[PHP-DB] Re: PHP - MySQL

2001-07-25 Thread news.php.net
> The code should not be on the page which comes > after clicking, but on the same page where the button is. if this is the requirement, then look maybe use javascript -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP-DB] Re: PHP - MySQL

2001-07-25 Thread news.php.net
Trick is to have a server side script which increments a counter and redirects to the desired page. So you'd create something like this: /counter?uri= and in your database you'll have fields for the uri and the number of hits so far. goodluck :) "Pranot Kokate" <[EMAIL PROTECTED]>

Re: [PHP-DB] Re: new data detect

2001-07-25 Thread Hugh Bothwell
From: "Sommai Fongnamthip" <[EMAIL PROTECTED]> To: "Hugh Bothwell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 10:37 PM Subject: Re: [PHP-DB] Re: new data detect > > At 22:28 25/7/2001 -0400, Hugh Bothwell wrote: > > >"Sommai Fongnamthip" <[EMAIL PROTECTED]> wrote in me

[PHP-DB] report style printing

2001-07-25 Thread Sommai Fongnamthip
Hi, When I retrieve data to display on web with PHP, it can print out from web in Browser Stlye. How could we have some PHP code to retrieve current display data into PC and print it with some Custom Report Style? Sommai Fongnamthip -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] Re: new data detect

2001-07-25 Thread Sommai Fongnamthip
Why PHP cannot do background check with the same of Java Script? At 22:28 25/7/2001 -0400, Hugh Bothwell wrote: >"Sommai Fongnamthip" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, > > I decide to make real time application (like stock market or online

[PHP-DB] Re: new data detect

2001-07-25 Thread Hugh Bothwell
"Sommai Fongnamthip" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > I decide to make real time application (like stock market or online > news). How could I know when new data arrive to table and retrieve them to > display or update in web page? You ca

Re: [PHP-DB] 'htaccess" method : how to modify passwords from PHP scripts ?

2001-07-25 Thread Jordan
> > There is a fantastic class that takes care of writing .ht* files... look > > here: > > > > http://phpclasses.upperdesign.com/ > > > Couldnt find anything on writing .ht* files. Are you sure? I looked and originally had trouble finding the class there too. I think it is a mirror of a version

[PHP-DB] new data detect

2001-07-25 Thread Sommai Fongnamthip
Hi, I decide to make real time application (like stock market or online news). How could I know when new data arrive to table and retrieve them to display or update in web page? Sommai Fongnamthip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROT

RE: [PHP-DB] 'htaccess" method : how to modify passwords from PHP scripts ?

2001-07-25 Thread Beau Lebens
http://www.zend.com/codex.php?CID=246 there's a couple there, i think there's also one on phpBuilder.com // -Original Message- // From: Caleb Walker [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 26 July 2001 9:56 AM // To: JD Daniels; Samuel Torton // Cc: php // Subject: Re: [PHP-DB] 'ht

Re: [PHP-DB] 'htaccess" method : how to modify passwords from PHP scripts ?

2001-07-25 Thread Caleb Walker
On Tuesday 24 July 2001 10:22 am, JD Daniels wrote: > There is a fantastic class that takes care of writing .ht* files... look > here: > > http://phpclasses.upperdesign.com/ > Couldnt find anything on writing .ht* files. Are you sure? -- PHP Database Mailing List (http://www.php.net/) To unsubs

[PHP-DB] oracle and informix interface

2001-07-25 Thread Sommai Fongnamthip
Hi, I've been known that PHP could connect to oracle or informix. But when I try to configure PHP, it tell me that there are some library required. How could I find oracle or informix support library for PHP? Sommai Fongnamthip -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] PHP and Oracle Stored Functions

2001-07-25 Thread Laurence Veale
Hi, I can call stored procedures no problem, but when it comes to functions, I've hit a brick wall. Can anyone help? Am I binding correctly? Is it right to declare the PL/SQL variable first? All help appreciated greatly. Code is included below PHP Code: // logon $conn = OCILogon

[PHP-DB] PHP and Oracle 8 Stored Functions

2001-07-25 Thread Laurence Veale
Hi, I can call stored procedures no problem, but when it comes to functions, I've hit a brick wall. Can anyone help? Am I binding correctly? Is it right to declare the PL/SQL variable first? All help appreciated greatly. Code is included below PHP Code: // logon $conn = OCILogon

RE: [PHP-DB] WHERE field = str

2001-07-25 Thread Matthew Loff
Good call, Paul... I checked through the manual briefly to see if LIKE was in there, I guess I missed that page. -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:08 PM To: Matthew Loff; [EMAIL PROTECTED]; 'PHP DataBase-List' Subject: R

RE: [PHP-DB] WHERE field = str

2001-07-25 Thread Paul DuBois
At 2:55 PM -0400 7/25/01, Matthew Loff wrote: >Certainly not in the PHP manual, and LIKE isn't really covered in the >MySQL manual either... Of course it is. http://www.mysql.com/doc/S/t/String_comparison_functions.html > >Here's a good page with an intro to SQL queries: >http://developer.ecor

Re: [PHP-DB] Re: another php/mysql problem

2001-07-25 Thread Hugh Bothwell
Couple of comments: 1. What's with the $artist = "artist"; echo $mytable[$artist]; bit? This really doesn't seem to gain you much. 2. Descriptive variable names are a Good Thing(tm). 3. Prettyprinting " 4. Why are the tables in different databases to begin with? 5. Don't pull any more th

RE: [PHP-DB] Re: another php/mysql problem

2001-07-25 Thread Dave Watkinson
Hi Matt I think I get what you're trying to do. I'd do something like this... Put all three tables in the same database. Add a column to bands called uid (I _think_ you'll have to recreate the table first cos you need it to be AUTO_INCREMENT, and add a PRIMARY KEY onit). Then add a column to sh

Re: [PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Chris Hobbs
> $rows = $cols + ceil(($numdata-($cols*$cols))/$cols); Seb suggested a much easier way: $rows = ceil($numdate/$cols); -- Chris Hobbs Silver Valley Unified School District Head geek: Technology Services Coordinator webmaster: http://www.silvervalley.k12.ca.us/~chobbs/ post

Re: [PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Chris Hobbs
Hmmm. No code, but I'm guessing you'll probably want to set the width of the table to be int(sqrt(mysql_num_rows($results))), and then set up your loops to place only that amount of cells across. Then just keep going til you run out of data. So in the example of 31, you'd set the number of column

RE: [PHP-DB] WHERE field = str

2001-07-25 Thread Matthew Loff
Certainly not in the PHP manual, and LIKE isn't really covered in the MySQL manual either... Here's a good page with an intro to SQL queries: http://developer.ecorp.net/sqltut.htm --Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2

RE: [PHP-DB] WHERE field = str

2001-07-25 Thread Boget, Chris
> I searched everything I could think of. Where should I have > found this is the manual? Nowhere in the PHP manual, I think. But you could find info on this in the MySQL manual (or any other db server's documentation...) Chris

Re: [PHP-DB] WHERE field = str

2001-07-25 Thread phpnet
Thanks Chris I searched everything I could think of. Where should I have found this is the manual? Dave | > I am trying to find a str within a field using a select statement like | > SELECT * FROM tablename WHERE fieldname has the string within it | > Is there a way to do this? | | WHERE fieldn

RE: [PHP-DB] WHERE field = str

2001-07-25 Thread Boget, Chris
> I am trying to find a str within a field using a select statement like > SELECT * FROM tablename WHERE fieldname has the string within it > Is there a way to do this? WHERE fieldname LIKE "%$string%" Chris

[PHP-DB] WHERE field = str

2001-07-25 Thread phpnet
I am trying to find a str within a field using a select statement like SELECT * FROM tablename WHERE fieldname has the string within it Is there a way to do this? Dave -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP-DB] Re: database abstraction for php3

2001-07-25 Thread Manuel Lemos
Hello, Geoffrey Makstutis wrote: > > Hi, > > Can anyone suggest a good (and simple) database abstraction class for php3? > > I have been using ADODB, but it doesn't like php3. Metabase supports PHP 3. According to this poll it seems that roughly 20% of the users still need PHP 3 support when

[PHP-DB] Re: database abstraction for php3

2001-07-25 Thread Manuel Lemos
Hello, Geoffrey Makstutis wrote: > > Hi, > > Can anyone suggest a good (and simple) database abstraction class for php3? > > I have been using ADODB, but it doesn't like php3. Metabase supports PHP 3. According to this poll it seems that roughly 20% of the users still need PHP 3 support when

[PHP-DB] Re: database abstraction for php3

2001-07-25 Thread Manuel Lemos
Hello, Geoffrey Makstutis wrote: > > Hi, > > Can anyone suggest a good (and simple) database abstraction class for php3? > > I have been using ADODB, but it doesn't like php3. Metabase supports PHP 3. According to this poll it seems that roughly 20% of the users still need PHP 3 support when

Re: [PHP-DB] Re: another php/mysql problem

2001-07-25 Thread Matt Nigh
ok, well it looks like no one really understood my problem, which is ok because didn't explain it well. i can barely understand myself what i'm trying to do, but what i'll try doing is just telling you all what exactly i need to happen. ok, i have 3 tables, two of them (bands, shows) being in a D

RE: [PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Seb Frost
Well it seems what you're trying to do is to set as square a table as you can. So, take your number of entries and square root it. Now round it up. Now divide the number of entries by that number and again round up. Now use these two numbers to make the table. Should be pretty straighforward..

RE: [PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Robert Klinkenberg
Or 5x6 and 1 over... But if you want to minimise the number of blank fields, you could determine a max number of columns (and a minimum number of colums) that you want to display and calculate the number of blank fields for all posibilities combinations. Choose the one that minimises the number o

[PHP-DB] Question on how to test a value

2001-07-25 Thread Lara J. Fabans
Hi, friends, Here is how I'm putting the information into the database: $query7 = isset($price) ? "INSERT INTO price (itemid, price) VALUES ($itemid, '$price')" : 0; $result7 = @pg_Exec($connection, $query7 ); I'm having difficulties with my test in display. I've tried isset and == 'NULL' and =

RE: [PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Mark Roedel
> -Original Message- > From: Ian Grant [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 11:28 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Re: Making a new row in HTML tables > > > Yeah, but if I had 31, > I'd want 6x5 and then 1 over, or something What about 16? 2x8,

[PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Ian Grant
Yeah, but if I had 31, I'd want 6x5 and then 1 over, or something Hugh Bothwell <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Umm... 31 entries, 1 x 31... > > You might be better to choose a standard width and pad the last row with > empty cells. > > "Ia

[PHP-DB] Re: Making a new row in HTML tables

2001-07-25 Thread Hugh Bothwell
Umm... 31 entries, 1 x 31... You might be better to choose a standard width and pad the last row with empty cells. "Ian Grant" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Can anyone help me with this - I have a database of people, that I want to >

[PHP-DB] Making a new row in HTML tables

2001-07-25 Thread Ian Grant
Hi, Can anyone help me with this - I have a database of people, that I want to print into an HTML table - how can I make the table wrap into an equal number of rows. i.e. if there are 4 entries, a 2x2 table, 6 a 2x3, 8 a 2x4, 9 a 3x3, etc. At the moment, I have something like: $rows=mysql_num_r

Re: [PHP-DB] Allowing refresh without form processing?

2001-07-25 Thread Dobromir Velev
Hi, Name your form submit button somehow, for example then when the page is refresh check if there is a variable named $my_submit_button. If there is not than the page is refreshed using the refresh button or the form was submitted with th "Enter" key. You will process the form only when there i

[PHP-DB] Re: draw graph

2001-07-25 Thread Hugh Bothwell
"Sommai Fongnamthip" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Dear, > How could I draw graph with gd by using PHP code with custom log scale? How 'bout: function drawLogGraph($arr) { $xoffs = 20; $yoffs = 180; $drawwidth = 160; $drawhei

[PHP-DB] Allowing refresh without form processing?

2001-07-25 Thread John Pickett
Hey, I have a page where I'd like to allow the client to use their refresh button. The only problem with this is, when they submit a form that's on the page, it is parsed by the same page. So if they hit refresh, the same information will be submitted twice (or more). How can I "clear" out any

Re: [PHP-DB] PHP - MySQL

2001-07-25 Thread Dobromir Velev
Hi, you could point the form to submit itself to the same page, log the click and then redirect to the next page with heade("Location: next_page.php"); Hope this helps Dobromir Velev -Original Message- From: Pranot Kokate <[EMAIL PROTECTED]> To: PHP-DB list <[EMAIL PROTECTED]> Date: Wedn

Re: [PHP-DB] draw graph

2001-07-25 Thread Dobromir Velev
Check http://www.phplot.com I think it could be helpful Dobromir Velev -Original Message- From: Sommai Fongnamthip <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Wednesday, July 25, 2001 11:35 AM Subject: [PHP-DB] draw graph >Dear, > How could I draw graph with gd

Re: [PHP-DB] Problem with my first script

2001-07-25 Thread Dobromir Velev
Hi, you shoud use $myrow[field_name] instead of $myrow(field_name). Notice the brackets. As long $myrow is an array $myrow() points to a function array() which ends up with error. Dobromir Velev -Original Message- From: Fernando Gonzalez <[EMAIL PROTECTED]> To: leo g. divinagracia iii <[E

Re: [PHP-DB] Question regarding php and mysql with binary data...

2001-07-25 Thread Mitrana Cristian
Koutsogiannopoulos Karolos wrote: >Hello Again everyone... > >My question is simple... > >I have images submited IN my mysql Database. >What i want is when i display them and i right click on them and choose save >picture as i can get the name of the >picture from the DB and not have to insert i

RE: [PHP-DB] search database

2001-07-25 Thread Seb Frost
Could you be more specific? You can do ANYTHING using the select command. - seb -Original Message- From: J- E- N [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 12:02 To: [EMAIL PROTECTED] Subject: [PHP-DB] search database can you suggest how to do a database search aside from using "

[PHP-DB] search database

2001-07-25 Thread J- E- N
can you suggest how to do a database search aside from using "like" in my query string. thanks a lot -- 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: [EMA

[PHP-DB] PHP - MySQL

2001-07-25 Thread Pranot Kokate
Dear friends, how can i monitor/count how many times a button is clicked. The code should not be on the page which comes after clicking, but on the same page where the button is. This is the need pls help regards, pranot

[PHP-DB] draw graph

2001-07-25 Thread Sommai Fongnamthip
Dear, How could I draw graph with gd by using PHP code with custom log scale? Sommai Fongnamthip -- 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: [

[PHP-DB] Re: another php/mysql problem

2001-07-25 Thread Markus Wagner
Matt Nigh schrieb: > Matt Nigh > > $link = mysql_connect("localhost","username","password"); > if(!$link) die ("Could not connect to MySQL!"); > mysql_select_db("almavale_board",$link); > if (!isset($band)) { > die("No artist specified."); > } > $sql = "select * from bands where (nospaces_band

Re: [PHP-DB] line breaks in mySQL text fields

2001-07-25 Thread Caleb Walker
On Monday 23 July 2001 11:16 am, kmurrah wrote: > How do I add new line characters to a text field in mySQL ? > > i.e. i need to manually insert "returns" into my text ... > > thanks in advance, > > KennM Does the "\n" not work? I dont have time to try it write now but did you try it? -- PHP