Re: [PHP-DB] Best way to remove slashes?

2005-02-02 Thread Brent Baisley
It looks like you might be running addslashes multiple times, which means you would need to run stripslashes multiple times. This usually happens when you run addslashes on the data before entering into the database, but also have magic quotes enabled (which does the same thing). Use get_magic_

[PHP-DB] Best way to remove slashes?

2005-02-01 Thread Chris Payne
Hi there everyone, What’s the best way to remove slashes to stop the following from being output from a string: City = HYPERLINK "file:///\\'Alliance\\"\\\'Alliance\\\' Say the string is called $city, I tried the following: Stripslashes($city); but it didn’t seem to work? C

Re: [PHP-DB] Best way to show multiple pages reports from database

2003-10-20 Thread Peter Beckman
On Thu, 16 Oct 2003, Dejan Milenkovic wrote: > I'm not fammiliar with internal MySQL architecture and exactly how things > work but I was wondering what is the most effcient way of spliting reports > over multiple pages. Is there a preformance difference between these two > codes, specialy if ther

[PHP-DB] Best way to show multiple pages reports from database

2003-10-17 Thread Dejan Milenkovic
I'm not fammiliar with internal MySQL architecture and exactly how things work but I was wondering what is the most effcient way of spliting reports over multiple pages. Is there a preformance difference between these two codes, specialy if there are some complex conditions and joins that should be

Re: [PHP-DB] Best way to multi-thread (Kind of)?

2003-08-18 Thread Chris Payne
Hi there, Ahhh you're a life saver, thanks for that that really helps out alot - and makes sense when I think about it :-) Regards Chris > For each message have a autoincrement message ID, an INT field is sufficient I > would guess. > > Also in each message record, have a parentID field as INT

Re: [PHP-DB] Best way to multi-thread (Kind of)?

2003-08-18 Thread Micah Stevens
For each message have a autoincrement message ID, an INT field is sufficient I would guess. Also in each message record, have a parentID field as INT, default this to 0, and if the message is a reply to another message, make the parentID = to the first message's ID field. When you're disp

[PHP-DB] Best way to multi-thread (Kind of)?

2003-08-18 Thread Chris Payne
Hi there everyone, I have almost finished my forums system (Thanks for the feedback BTW on optimizing the basic query code). Now that works fine on all 6 forums (Though i've programmed the 6th forum differently to allow image uploading and resizing). My question is this, I want people to be ab

RE: [PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Creative Solutions New Media
June 17, 2003 3:57 PM To: '[EMAIL PROTECTED]'; PHP-DB Subject: RE: [PHP-DB] Best way to pass multiple selections to a DB Tim, You need to name your multiple select box as an array (e.g. selectThis[]). The values will be passed as an array to the next page. You then need to iterate over

Re: [PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Becoming Digital
unning individual queries or building your multi-value query string. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Creative Solutions New Media" <[EMAIL PROTECTED]> To: "PHP-DB" <[EMAIL PROTECTED]> Sent: Tuesday, 17 June, 20

RE: [PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Hutchins, Richard
just search for select box or multiple select or the like and you should get plenty of hits with code and summaries and the whole smash. Rich > -Original Message- > From: Creative Solutions New Media [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 17, 2003 2:53 PM > To: PHP-DB &

[PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Creative Solutions New Media
Hello, Can anyone enlighten me as to some techniques for transferring information from a multiple select list box to mySQL. Someone recommended something about using join tables for this (which I have no idea how to set up). Thanks Tim Winters Manager, Creative Development Sampling Technologies

RE: [PHP-DB] best way to iterate through DB_Result the second time around?

2003-02-02 Thread John W. Holmes
> Iterating over a result set is eaasy the first time; > > while( $group_data = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) > { > blah... > } > > > How come DB_Result doesn't have a reset() function so you can iterate over > the result set a second time without having to resort to

[PHP-DB] best way to iterate through DB_Result the second time around?

2003-02-02 Thread Brad Hubbard
Iterating over a result set is eaasy the first time; while( $group_data = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) { blah... } How come DB_Result doesn't have a reset() function so you can iterate over the result set a second time without having to resort to this sort of thi

Re: [PHP-DB] best way to stare true, false

2002-08-12 Thread leo g. divinagracia iii
if you are storing a bunch of T/F, you can store 8 of them into a single byte... each bit position will represent one "question"... you just have to do some BIT manipulation on your end... andy wrote: > Hi there, > > I am searching for the best way to store true or false inside a MySQL DB. > W

Re: [PHP-DB] best way to stare true, false

2002-08-11 Thread Jim Hunter
se globals there as well avaialable to all your programs without thinking about it again. Remember, keep your code readable, runable and reusable! Jim Hunter Diamond Computing ---Original Message--- From: andy Date: Saturday, August 10, 2002 07:40:19 AM To: [EMAIL PROTEC

RE: [PHP-DB] best way to stare true, false

2002-08-11 Thread Mark Middleton
Andy, I do use the "ENUM" technique quite a bit, with good results. it's even easier if you set the ENUM values to 1 and 0, then when you do a database query, you don't have to read the string, you can simply check for it's presence. Here's a fictitious example: In user_table, make a field for

Re: [PHP-DB] best way to stare true, false

2002-08-11 Thread Andy
oh... no I ment it in a different way.. somehow.. declare 1 enum value and then set it or not. Search for NULL or not NULL values instead of false /true. in this direction, but .. hey does nobody do this like that?? Andy -- http://www.globos

Re: [PHP-DB] best way to stare true, false

2002-08-10 Thread Raquel Rice
On Sat, 10 Aug 2002 17:41:56 +0200 "andy" <[EMAIL PROTECTED]> wrote: > > > Hi there, > > > > > > I am searching for the best way to store true or false inside > > > a MySQL DB. With best I mean the most data efficient way and > > > in the same time the best for fast searching later on the > > > t

Re: [PHP-DB] best way to stare true, false

2002-08-10 Thread andy
hmm.. thats how I am doing it right now. There might be a better way?! "Raquel Rice" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Sat, 10 Aug 2002 16:46:54 +0200 > "andy" <[EMAIL PROTECTED]> wrote: > > > Hi there, > > > > I am searching for the

Re: [PHP-DB] best way to stare true, false

2002-08-10 Thread Raquel Rice
On Sat, 10 Aug 2002 16:46:54 +0200 "andy" <[EMAIL PROTECTED]> wrote: > Hi there, > > I am searching for the best way to store true or false inside a > MySQL DB. With best I mean the most data efficient way and in the > same time the best for fast searching later on the table to find > all which

[PHP-DB] best way to stare true, false

2002-08-10 Thread andy
Hi there, I am searching for the best way to store true or false inside a MySQL DB. With best I mean the most data efficient way and in the same time the best for fast searching later on the table to find all which are false, or true. I think I did read something about a way to do this with ENUM,

[PHP-DB] Best way to have virtual objects do something?

2002-07-18 Thread Leif K-Brooks
First of all, I'm sorry if the php general list would be a better place to do this. Anyway, I am making a game website with a friend. Among other things, it will have virtual objects that can be used to do things. My database structure idea is something like: item_actions(id int,displaycode

Re: [PHP-DB] Best way to not display frozen users?

2002-04-11 Thread Leif K-Brooks
on 4/11/02 11:14 AM, Leif K-Brooks at [EMAIL PROTECTED] wrote: I run a gaming website. Sometimes, I have to freeze users for one thing or another. But, since there are lots of tables involving users that get displayed to other users, they still get seen. One solution to this seems to be to hav

[PHP-DB] Best way to not display frozen users?

2002-04-11 Thread Leif K-Brooks
I run a gaming website. Sometimes, I have to freeze users for one thing or another. But, since there are lots of tables involving users that get displayed to other users, they still get seen. One solution to this seems to be to have an array of frozen users in the header, which I check when dis

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Peter Lovatt
-- Excellence in internet and open source software --- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473 --- > -Original Message- > From: Monty [mailto:[EMAIL PROTECTED

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
> I like your idea about the [start-stop block]. To maybe > merge what Paul > said with your idea, you could store the name of the function handler > (generates the appropriate content) inside the "[]". I meant Peter :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, vi

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
-- Court > -Original Message- > From: Monty [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 07, 2002 1:04 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Best way to store/retrieve content?? > > > Hi Court, thanks a lot for your advice. > > I am fairly new

Re: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Monty
Monty > From: [EMAIL PROTECTED] (Court Shrock) > Newsgroups: php.db > Date: Thu, 7 Mar 2002 12:16:07 -0800 > To: 'Monty' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Best way to store/retrieve content?? > > Actually, CSS is very powerful--way mo

Re: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Monty
all articles in one data table so searches can be easily done on all articles. Thanks! Monty > From: [EMAIL PROTECTED] (Peter Lovatt) > Newsgroups: php.db > Date: Thu, 7 Mar 2002 20:11:00 - > To: "Monty" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > Subj

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
s. > -Original Message- > From: Monty [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 07, 2002 11:46 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Best way to store/retrieve content?? > > > I will be using CSS for other thing, such as paragraph > form

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Peter Lovatt
aia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473 --- > -Original Message- > From: Monty [mailto:[EMAIL PROTECTED]] > Sent: 07 March 2002 19:31 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Best way to store/retrieve content?? > &g

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Leotta, Natalie (NCI/IMS)
e them for some of our web publications for the NCI. Good luck! -Natalie > -Original Message- > From: Monty [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, March 07, 2002 2:46 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Best way to store/retrieve content?? > >

Re: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Monty
Hi Natalie, no, PDFs won't work. I need to display the content as an HTML page. > From: [EMAIL PROTECTED] (Natalie Leotta) > Newsgroups: php.db > Date: Thu, 7 Mar 2002 14:32:57 -0500 > To: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Best way to store/retrieve content?? >

Re: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Monty
27;Monty' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Best way to store/retrieve content?? > > I would try to use CSS, instead of complex tables. That way, you only need > to store the structural html in the database and the layout is handled by >

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
> Sent: Thursday, March 07, 2002 11:31 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Best way to store/retrieve content?? > > > I'm writing some content management scripts for an online > magazine. Many > articles are formatted in a similar way, but some have a > uniqu

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Leotta, Natalie (NCI/IMS)
Could you use PDFs? -Natalie > -Original Message- > From: Monty [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, March 07, 2002 2:31 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Best way to store/retrieve content?? > > I'm writing some content manage

[PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Monty
I'm writing some content management scripts for an online magazine. Many articles are formatted in a similar way, but some have a unique page layout that includes grids of photos, tables, etc. I'm not sure if the best way to store content is in a database so it can be flowed into an article templ

[PHP-DB] best way connect MS SQL

2001-08-10 Thread Sommai Fongnamthip
Hi, I wonder which the best way to connect PHP from Linux to MS SQL on NT? - freeTDS - ODBC (iODBC, unixODBC, MyODBC) I was still can not connect with anyone! Regards, Sommai Fongnamthip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail:

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

2001-03-29 Thread Doug Semig
I see you there's been lots of responses already, but there's an important related bit of news folks might want to know. Everyone who uses the mysql_affected_rows() should know that a bug was fixed in 3.23.36 that evidentally reports affected rows incorrectly if MySQL was compiled without support

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

2001-03-29 Thread Terry Romine
On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote: > Doesn't the command return 1 or 0 in success or failure? > > You may not have a result > > Probably wrong but something like > > if (mysql_query($query)) { > > } else { > > } What I understand is that the return from the query only

[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

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

2001-03-29 Thread Nick Davies
Doesn't the command return 1 or 0 in success or failure? 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 die On Thu, 29 Mar 2001, Boget, Chris wrote: > > i was just wondering what you g

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

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

2001-03-29 Thread Karsten Dambekalns
On Thu, Mar 29, 2001 at 02:25:42PM +0200, Hans-Werner Guth wrote: > We do it this way (code snippet) > > Bartek Pawlik wrote: > > ...snipp... > > > > > > I normally do something like: You can do something like --- if(mysql_query($sql)) { success } else { error } --- Regard

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

2001-03-29 Thread Hans-Werner Guth
We do it this way (code snippet) ... $dbqueryline = mysql_db_query ($mredatabase, "select vorgang, bezeichnung from mrebewkennz order by vorgang", $dbhandle); if (mysql_errno() != 0) { echo mysql_error(); echo "\n"; } else { $bewkenznzahl = mysql_num_rows($dbqueryline); print

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

2001-03-29 Thread Bartek Pawlik
I do the same and I think this is the only way Bartek Pawlik - Original Message - From: Jordan Elver <[EMAIL PROTECTED]> To: PHP Database Mailing List <[EMAIL PROTECTED]>; PHP General Mailing List <[EMAIL PROTECTED]> Sent: Thursday, March 29, 2001 1:00 PM Subject: [P

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

2001-03-29 Thread Jordan Elver
Hi, 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 normally do something like: $sql = "SELECT something FROM table"; $result = mysql_query($sql); if(@mysql_num_rows($result) >

Re: [PHP-DB] Best Way

2001-02-18 Thread Koos van den Hout
Quoting Don Smith who wrote on Sat, Feb 17, 2001 at 08:56:19PM -0600: > I've searched the manual and read many examples, but I have to ask here for > the best way to program for a number of possibilities. I've got my site > working the hard way, but I'll bet there's a smarter way of doing the > f

Re: [PHP-DB] Best Way

2001-02-18 Thread phobo
ust remove the last four characters, and perform the query... Siggy - Original Message - From: "Don Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 18, 2001 3:56 PM Subject: [PHP-DB] Best Way > I've searched the manual and read man

[PHP-DB] Best Way

2001-02-17 Thread Don Smith
I've searched the manual and read many examples, but I have to ask here for the best way to program for a number of possibilities. I've got my site working the hard way, but I'll bet there's a smarter way of doing the following: Visitors to my site can search my database by lastname and/or firstn