RE: [PHP-DB] elseif with header

2003-01-21 Thread Bruno Pereira
I Larry is correct you havo to use (==) not (=). The first one is comparing two variables and the second is that var is equal to another var. Cumprimentos Bruno Pereira [EMAIL PROTECTED] -Original Message- From: Larry E. Ullman [mailto:[EMAIL PROTECTED]] Sent: terca-feira, 21 de Janeiro

[PHP-DB] Efficiency

2003-01-21 Thread Baumgartner Jeffrey
A couple of questions of efficiency, please: 1. If I am creating a web page with numerous PHP calls to an MySQL database is it more efficient to have lots of small blocks of php in an html page or is it better to have just one or two big blocks of PHP with the html code being delivered via echo

[PHP-DB] Re: Problem in the returnvalue of a function

2003-01-21 Thread Ruprecht Helms
Hi Bayu Susiloadhy, thanks for your answer. function select_price($product_id,$quantity) { --cut-- return True; } --cut-- in the meentime I change the code that not a boolevalue was returned by the function. $q is my querystring and $db is the selected database. I insert the

[PHP-DB] image in mysql?

2003-01-21 Thread Henry
is that possible in mysql that store image in mysql db , just like oracle's blob/bfile ... and how to extract these binary into real image if I use php?

Re: [PHP-DB] Efficiency

2003-01-21 Thread Paul Burney
on 1/21/03 6:16 AM, Baumgartner Jeffrey at [EMAIL PROTECTED] appended the following bits to my mbox: 1. If I am creating a web page with numerous PHP calls to an MySQL database is it more efficient to have lots of small blocks of php in an html page or is it better to have just one or two big

Re: [PHP-DB] image in mysql?

2003-01-21 Thread Paul Burney
on 1/21/03 7:00 AM, Henry at [EMAIL PROTECTED] appended the following bits to my mbox: is that possible in mysql that store image in mysql db , just like oracle's blob/bfile ... and how to extract these binary into real image if I use php? This has been answered numerous times on the list.

Re: [PHP-DB] image in mysql?

2003-01-21 Thread Henry
thanks , that helps a lot to me!! one more question, can I use HTML's img to show the image with other thing instead of only image? - Original Message - From: Paul Burney [EMAIL PROTECTED] To: Henry [EMAIL PROTECTED]; PHP Database List [EMAIL PROTECTED] Sent: Tuesday, January 21, 2003

Re: [PHP-DB] image in mysql?

2003-01-21 Thread Henry
Oops...Sorry , I got the answer...thanks anyway ^_^ - Original Message - From: Henry [EMAIL PROTECTED] To: Paul Burney [EMAIL PROTECTED]; PHP Database List [EMAIL PROTECTED] Sent: Tuesday, January 21, 2003 10:24 PM Subject: Re: [PHP-DB] image in mysql? thanks , that helps a lot to me!!

[PHP-DB] MySql DB, help, sql error and i don't know why

2003-01-21 Thread David Rice
SQL-query : CREATE TABLE `staff` ( `StaffId` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `Name` VARCHAR( 30 ) NOT NULL , `Surname` VARCHAR( 30 ) NOT NULL , `Address` TEXT( 225 ) NOT NULL , `JobId` SMALLINT( 2 ) NOT NULL , `PermissionId` SMALLINT( 2 ) NOT NULL , `HomePhone` INT( 11 ) NOT NULL

RE: [PHP-DB] MySql DB, help, sql error and i don't know why

2003-01-21 Thread Hutchins, Richard
I'm pretty sure that the error is because you're not able to set a length for the TEXT column type. I checked the MySQL manual and it does not show a prototype with that optional parameter. Besides, if you want a TEXT of (255), why not just use a VARCHAR (255)? They're essentially the same thing

[PHP-DB] Re: MySql DB, help, sql error and i don't know why

2003-01-21 Thread J.Veenhuijsen
use `Address` TEXT NOT NULL , Jochem David Rice wrote: SQL-query : CREATE TABLE `staff` ( `StaffId` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `Name` VARCHAR( 30 ) NOT NULL , `Surname` VARCHAR( 30 ) NOT NULL , `Address` TEXT( 225 ) NOT NULL , `JobId` SMALLINT( 2 ) NOT NULL ,

[PHP-DB] repost..odbc

2003-01-21 Thread Edward Peloke
I apologize if you subscribe to the php general list also as this is a re-posting from there.. I know I can connect to another db through an odbc connection in php. Can I use php to create the connection initially? I will be uploading an access db from the users and then moving the data over

Re: [PHP-DB] Sybase_Connect

2003-01-21 Thread Cameron
Now I get a pop up that says: Unknown(): Unable to load dynamic library 'F:\PHP\extensions\php_sybase_ct.dll' = The specified module could not be found. I've looked for spelling errors multiple time and I am absolutly 100% positive that the file is located with in that directory and is named

[PHP-DB] Problem loading images into MySQL

2003-01-21 Thread Chris Wright
I'm having big problems getting PHP to load images into a MySQL database. I can and have loaded images perfectly via other routes but when I try to do it via PHP the data always ends up corrupted. I don't get any errors but the binary data is always knackered. I'm using PHP 4.3.0/Apache 2.0.43 on

[PHP-DB] build menu with mysql data

2003-01-21 Thread Marc Bleuler
Hi, I would like to bild a tree menu with mySQL data. where I have the collapsed main menue and when I click the link the specific submenue expands (as follow). (collapsed Main Menu) + Home + Downloads + About me + Search and for example if I click the Download section it will look as

[PHP-DB] RE: [PHP] build menu with mysql data

2003-01-21 Thread Edward Peloke
Marc, I did something sort of along these lines with an 'auction' site I worked on. I displayed rows from a db. If the row had bid information in the db (or your case submenu info) then a + sign icon was displayed next to it. IF the plus sign was clicked, the page would reload and the bid or

[PHP-DB] using Flat File

2003-01-21 Thread web man
Hi Guys, i wondered if there any assistance you could do for me on this code. I have called on God many times to assist me but He did not respond. I hope you would. What I am trying to do is to allow certain users to view a certain page . I stored their names and passwords in a file.txt But

[PHP-DB] tutorials

2003-01-21 Thread Jon Miller
Looking for a php/mysql tutorial on how to handle mathamatical functions. -- Jon Miller [EMAIL PROTECTED] MMT Networks Pty Ltd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] tutorials

2003-01-21 Thread Jeffrey_N_Dyke
if you're looking to do math in sql, i'd look to the mysql manual. lots of great examples. basically same answer for php. i'd start there...if you don't find what you're looking for .google. www.php.net/math www.mysql.com hth Jeff

[PHP-DB] preview form field entries before db submission?

2003-01-21 Thread Addison Ellis
hello, do you know of a way to preview form field entries in a new page, the way they will appear in a query result, so that the user has a chance to edit their entries prior to their actual submission to the db? thank you and best, addison -- Addison Ellis small independent publishing co.

[PHP-DB] session_destroy(); on submit?

2003-01-21 Thread Addison Ellis
hello, will the following work or should i be attempting something else? /form input type=submit name=submit value=Submit onClick=?session_unset();,session_destroy();? input type=hidden name=url value=http://www.etc.com; thank you and best, addison -- Addison Ellis small independent

Re: [PHP-DB] session_destroy(); on submit?

2003-01-21 Thread Paul Burney
on 1/21/03 9:19 PM, Addison Ellis at [EMAIL PROTECTED] appended the following bits to my mbox: hello, will the following work or should i be attempting something else? /form input type=submit name=submit value=Submit onClick=?session_unset();,session_destroy();? input type=hidden name=url

RE: [PHP-DB] preview form field entries before db submission?

2003-01-21 Thread John W. Holmes
do you know of a way to preview form field entries in a new page, the way they will appear in a query result, so that the user has a chance to edit their entries prior to their actual submission to the db? Just store the values in a session or hidden fields and show the display to the

[PHP-DB] Cookies problems

2003-01-21 Thread Sabina Alejandr Schneider
Hello people!!! This time I have a problem with cookies. I tried to send a cookie from one page with the function sendcookie(chat,$mail) to a page in another directory, but when I tried to prine echo($chat) or echo($_COOKIE[chat]) I got notheing. So I put the second page where it was the page

[PHP-DB] datetime

2003-01-21 Thread Addison Ellis
hello and thank you... probably again. using datetime, /or something else if applicable, is it possible to have entries to a page and entries to a db automatically delete? i have looked through many docs at php.net and mysql and can't find anything. perhaps i'm using the wrong search key

[PHP-DB] Array problems

2003-01-21 Thread Michael Conway
I find myself stuck in coming up with a way to cycle through this array of db results for porting to a graphing script that I did not write. My latest attempt to get around this problem is below. Outside of the $graph-SetDataValues(array( ));, echoing $array[$i] produces the desired

[PHP-DB] Using Objects with Databases

2003-01-21 Thread Philip Zee
Hello all, I am trying to create a class, say User. Each user has an entry in the database table called user. Each function, including the constructor, will be calling the database to do something. Is it better to initialize the database connection inside each function or is it better to

RE: [PHP-DB] Using Objects with Databases

2003-01-21 Thread Luke Woollard
Initialise the database connection and perform actions on the database using a seperate class. You can pass your functions (methods) values returned from your database calls to manipulate. This is commonly called a 'database abstaction layer' Theres a good database abstraction class in this

RE: [PHP-DB] Using Objects with Databases

2003-01-21 Thread Philip Zee
Luke, Thanks for the help. This only answers half of my question. I understand that you need to build a class to handle your database needs. However, once the database returns a row in the table user, there will be functions performed for that user. I was thinking about creating a class User

RE: [PHP-DB] Using Objects with Databases

2003-01-21 Thread Luke Woollard
I store all my sql queries in an include file. These queries could store the actions you want to perform for each user.. I then use scripts to execute queries (with an alias name for each) based on decisions (such as whether certain $_POST variables are present etc..) If I were building a 'user'

[PHP-DB] foreach($HTTP_POST_VARS as $key = $value)

2003-01-21 Thread Addison Ellis
hello, i do appreciate your time... below the code following i don't know where to go. do i need to list each value individually or can i do something with $HTTP_POST_VARS or am i even headed in the right direction? i am trying to point all my forms to this .php file to check for errors,

[PHP-DB] Re: [PHP] build menu with mysql data

2003-01-21 Thread Marc Bleuler
Hi Eddie, This is exactly what I'm looking for. I don't have some code today that's why I'm posting to the newsgroup. The only working thing I have today is the listing of the main db It looks a bit whired since I copy past it from the file. Could you post some of your code?

RE: [PHP-DB] Re: [PHP] build menu with mysql data

2003-01-21 Thread Edward Peloke
Marc, Here is the entire script... It is doing a lot of things you don't need so you will have to sift through it to see what you want. If you have any questions, just ask. Eddie ? require(connection.php); if ($addbid) { # setup SQL statement $SQL = INSERT INTO bids;