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_
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
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
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
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
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
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
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
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
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
&
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
> 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
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
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
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
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
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
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
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
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
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,
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
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
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
--
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
[EMAIL PROTECTED]
tel. 0121-242-1473
---
> -Original Message-
> From: Monty [mailto:[EMAIL PROTECTED
> 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
--
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
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
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
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
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
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??
>
>
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??
>
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
>
> 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
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
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
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:
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
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
> 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
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
> 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
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
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
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
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) >
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
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
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
50 matches
Mail list logo