RE: [PHP-DB] Hold that insert!

2001-03-27 Thread Boget, Chris
> Click Here! "), so in that case I display the form. If it does not have an > empty value, the user has clicked the submit button, so I can go ahead > processing the form data. Like this: > if ( empty($submit) ) > { > ### Display the form > } > else > { > ### Do some checks to make the

RE: [PHP-DB] Hold that insert!

2001-03-27 Thread Boget, Chris
> I like your simplicity and straightforwardness. Thanks. ;p > My code tends toward: > switch($submit) { > case: "Accept": > .. insert record > break; > case: "Delete": > .. delete record > break; > case "Cancel": >

RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Boget, Chris
> i was just wondering what you guys do to check if a wquery > suceeded or not? > I know about mysql_num_rows() and mysql_affected_rows(), just > wondered what > you guys do? I do this: $result = mysql( $dbname, $query ); if(( $result ) && ( mysql_errno() == 0 )) { // query was successful

[PHP-DB] RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Boget, Chris
> Doesn't the command return 1 or 0 in success or failure? Not 1 or 0. It returns 0 or some other value. Almost the same, but not quite. > You may not have a result > Probably wrong but something like > if (mysql_query($query)) { > } else { > } > or you could die out mysql_query($query) or d

RE: [PHP-DB] Header() order

2001-04-06 Thread Boget, Chris
> Do you know the header() order? > For example: header("Set-Cookie") should come before/after > header("Location")? > Cause IE seems to be sensitive about this. Cookies need to come first. Chris

RE: [PHP-DB] Use of Like

2001-07-09 Thread Boget, Chris
> Can anyone tell me a way to simulate the command "LIKE" in > mySQL query´s, Simulate it where? In a SQL database? Another kind of database? Programatically? Chris

RE: [PHP-DB] Unexplained MySQL Error..

2001-07-20 Thread Boget, Chris
> UPDATE > WLPbib, WLPpublisher,WLPprofile,WLPbib2profile I think you can only update one table at a time... I could be wrong, though... Chris

RE: [PHP-DB] Unexplained MySQL Error..

2001-07-20 Thread Boget, Chris
> Chris: The MySQL documentation would make you think so... I don't think so > UPDATE [LOW_PRIORITY] [IGNORE] tbl_name > Note there isn't a tbl_name [, tbl_name2, ...]. It's just tbl_name... Right... that means just *one* table. Your query is updating 4 tables. Chris

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

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] Valid resource

2001-08-06 Thread Boget, Chris
> I'm getting the following error and have no idea what the > hell it means: > ** > the mentioned lines are: > ** > fputs ( $file, "\n"); > fputs ( $file, "\

RE: [PHP-DB] Stupid question=p

2001-09-17 Thread Boget, Chris
> The latter: > --- > Use implode() and explode(). or serialize(); Chris

RE: [PHP-DB] Renaming a database name...

2001-09-19 Thread Boget, Chris
> > Can I rename a database name ? > There is no command to do so. Have you tried simply renaming > the files and sub-directory where the database files are located? > I've not tried that. Simply renaming could be dangerous. You can do this: mysqldump old_database_name > old_database_name.tx

RE: [PHP-DB] Individual Lines of text

2001-09-25 Thread Boget, Chris
> I need to know if it is possible with PHP to write a script > that will pull the individual lines of this text file and store > them into a mysql database line by line. use file() and then loop through the array. Chris

RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread Boget, Chris
> I have an array coming from a form that I need to insert into mySQL. > example: name[], phone[], address[] Use serialize() on the variable before inserting into the table and then unserialize() after retrieving the data from the table. Read up on both of the above functions for more information

RE: [PHP-DB] No Caching (Reloading Fresh Content)

2001-11-13 Thread Boget, Chris
> How can I ensure that a specific page is never cached and ALWAYS gets > processed every time it is viewed? Sometimes a viewer can hit his/her > browser's Back button (such a hateful button), and get a cached version of > a dynamic page. I want this page's PHP code to be executed even if the >

[PHP-DB] Coding methods (was RE: [PHP-DB] gzip image files)

2001-11-27 Thread Boget, Chris
> $filename = 'kunden/'.$name.'.png'; I see this all the time and I'm curious: what takes more computing power (granted, either would be incredibly little I'm sure, just curious which requires more work by PHP)? this: $filename = "this " . $varname . " that"; or this: $filename = "this $varn