[PHP-DB] sql statement via var

2002-05-26 Thread Dave Carrera
Hi All I am trying to load a mysql statement which i have tested and know to work from a var in my script. It is a create table statement. I have a good connection as a table list shows tables. I tried to echo my var but no joy Any ideas? Thanks in Advance Dave C -- PHP Data

[PHP-DB] Sql from file

2002-05-26 Thread Dave Carrera
Hi All I have a working mysql statement that i would like to load from a file using my php script It first drops table if excists then creates table then loads sample data I have tried many different ways but no success :-( Any help or ideas would be most appreciated I have a

[PHP-DB] db sql issue from var

2002-05-26 Thread Dave Carrera
Hi All I have found the problem from my last post and need to know how to solve it. Example sql var: $sql = "DROP TABLE IF EXISTS test; CREATE TABLE test ..."; When i run the script i get Mysql error near ';' create table.. So how do i run this command from my script to i

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Janet Valade
Can't you do what you want to do without using two SQL statements? CREATE TABLE IF NOT EXISTS. Janet - Original Message - From: "Dave Carrera" <[EMAIL PROTECTED]> To: "php List" <[EMAIL PROTECTED]> Sent: Sunday, May 26, 2002 8:01 AM Subject: [PHP-DB] db sql issue from var Hi All I h

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Rasmus Lerdorf
Well, where is your ';'? At the end of the statement? You don't terminate queries with semi colons when talking directly to the database. Just remove it. -Rasmus On Sun, 26 May 2002, Dave Carrera wrote: > Hi All > > I have found the problem from my last post and need to know how to solve it.

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Rasmus Lerdorf
Ah, there is the issue. You cannot issue 2 SQL queries in a single mysql_query() call. You have to do them one at a time without the ; -Rasmus On Sun, 26 May 2002, Janet Valade wrote: > Can't you do what you want to do without using two SQL statements? > > CREATE TABLE IF NOT EXISTS. > > Janet

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread mike
$sql= ". you forgot the " :) Thanks, - Original Message - From: "Dave Carrera" <[EMAIL PROTECTED]> To: "php List" <[EMAIL PROTECTED]> Sent: Sunday, May 26, 2002 11:01 AM Subject: [PHP-DB] db sql issue from var Hi All I have found the problem from my last post and need to know how

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Dave Carrera
Hi Rasmus   I think it an issue with including multiple sql commands in one var...   as i see it...:   the drop table bit is one coomand and the create table is one command.   When i run these with or with the seperating ;

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Rasmus Lerdorf
> I think it an issue with including multiple sql commands in one var... Yup, you can't do that. Simply separate them and do them one at a time. -Rasmus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Dave Carrera
Ok craked it... yes me i craked it:-)   All you need to do is create an array from your sql like this:   1st place your dumped sql statement into a varibale.   2nd create an array from your sql like this   if(isset($your_execution_va

[PHP-DB] Simulating a FORM POST thing (HELP!)

2002-05-26 Thread Georgie Casey
Rite, when you see a web form, you know you can simulate the submit by filling in the values in the address field, just like a GET method, and it usually works the exact same. But how do you do it when one of the fields in the form is a file upload?!?!?! For the record, its a GIF file you've to u

[PHP-DB] Re: Simulating a FORM POST thing (HELP!)

2002-05-26 Thread Peter
"; print ""; ?> you get the idea I think PHP does have other funtions for file uplading though. "Georgie Casey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Rite, when you see a web form, you know you can simulate the submit by > filling in the values in th

[PHP-DB] INSERT no posible in MySQL

2002-05-26 Thread César L . Aracena
Hi all, I have a 3-page form input, where the variables are passed from one page to another using HTTP_POST_VARS and stored in the next one in HIDDEN fields (just to make sure). At the end of the 3rd page, is another one where I thank the visitor and proccess all the data. The data proccess c

[PHP-DB] Re: Simulating a FORM POST thing (HELP!)

2002-05-26 Thread Georgie Casey
i'm getting an error message saying my BMP file i'm trying to convert isnt a valid WBMP file? is dere a difference between BMP and WBMP? I just opened my GIF file into PSP7 and and saved as a windows bmp. why isnt it working? "Peter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[E

[PHP-DB] Re: Simulating a FORM POST thing (HELP!)

2002-05-26 Thread Peter
Windows Bitmap = BMP file a WBMP is a wireless bitmap image and is designed for display on mobile phones. A lot of software doesn't understand the format. You need to use createfrombmp() not createfromwbmp() "Georgie Casey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PRO

[PHP-DB] Re: Simulating a FORM POST thing (HELP!)

2002-05-26 Thread Georgie Casey
that function doest exist! "Peter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Windows Bitmap = BMP file > a WBMP is a wireless bitmap image and is designed for display on mobile > phones. A lot of software doesn't understand the format. > > You need to use

[PHP-DB] Re: db sql issue from var

2002-05-26 Thread Adam Royle
Hi Dave, Load the data from the text file into a variable (eg, $fileContents) Then split the file into an array and run every sql statement. The following code should work... Adam $arrSQL = explode(";",$fileContents); for ($i=0;$i

Re: [PHP-DB] INSERT no posible in MySQL

2002-05-26 Thread César L . Aracena
Thanx... it worked using double quotes around the variable name ({$HTTP_POST_VARS["varname"]} - Original Message - From: "Marcelo Leitner" <[EMAIL PROTECTED]> To: "César L. Aracena @hellfire.leitner.homeip.net" <[EMAIL PROTECTED]@hellfire.leitner.homeip.net,> Cc: "PHP DB List" <[EMAIL PRO

[PHP-DB] HELP USING THE MAIL FUNCTION WITH HTML

2002-05-26 Thread CrossWalkCentral
How can I use the Mail function to send html data. I have like a welcome letter I am working on and when the user signs up for such services I want this to be sent to them. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] HELP USING THE MAIL FUNCTION WITH HTML

2002-05-26 Thread Beau Lebens
you have to change the Content-Type header or something (text/html) but the easiest way is to use a pre-packed class (unless you really want to do it yourself). Check out hotscripts or just do a google for "php mail class" or similar :) HTH Beau // -Original Message- // From: CrossWalkC