Hi,
Probably because $user is not in the database.
Regards Henrik Hornemann
-Oprindelig meddelelse-
Fra: Earl Clare [mailto:[EMAIL PROTECTED]
Sendt: 18. januar 2005 07:59
Til: php-db@lists.php.net
Emne: [PHP-DB] i am lost (php warning)
Prioritet: Høj
Hi ya'll,
I am lost as to why
Hey thanks guys, the email was the problem
I had emial instead of email
Thanks for the assistance.
-Original Message-
From: Peter Lovatt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 18, 2005 1:45 AM
To: Earl Clare; php-db@lists.php.net
Subject: RE: [PHP-DB] i am lost (php warning)
H
The mysql_num_rows function requires that the argument passed to it
should be a valid MySQL result from a Select statement. Your script
doesn't explicitly establish a connection with the database so you could
be getting an error from that call, hence $sql_query would not be a
valid MySQL result
it means mysql_query() filed.
u must check it before using mysql_fetch_row()
f.e.
$query = "bla bla bla";
$result = mysql_query( $query );
if ( $result ){
while ( $row = mysql_fetch_row( $result ) ){
}
}
else {
echo mysql_error( $db_connect );
exit;
}
--
PHP Database Mailing List (http://w
Hi John,
I want to read a csv-file and import the datas into a mysql-db.
How do I make this. A little scriptexaple in php would be helpfull.
Why not just LOAD DATA INFILE from MySQL? No need to involve PHP at all,
really...
I think the command you also can write in the mysql_db_query-Command.
T
Hi
it means that the query did not produce a result - usually this is because
of a problem with the query.
$sql_query = mysql_query("SELECT * FROM cm_customer WHERE emial='$user'");
I am guessing you misspelt email and this should be
$sql_query = mysql_query("SELECT * FROM cm_customer WHERE e
You can use the mysql_insert_id() function, it returns the id generated
by the last query executed on the connection... hope this helps..
Zu3Bi
I was having trouble with retrieving the last insert id as well. Even
after looking over the information in the link, I couldn't figure out
how to mak
Hi list,
I try to store/retrieve pictures into MySQL.
I know that a lot of people will say this is not a good practice, so here
are briefly my reasons:
-I want to protect that pictures (restricted access)
-I don't want to use htaccess as I want my users to be able to modify their
password wheneve
try this:
$sql = "SELECT * FROM cm_customer WHERE
emial='$user'";
$sql_query = mysql_query($sql) or die($mysql_error());
bastien
From: "Henrik Hornemann" <[EMAIL PROTECTED]>
To:
Subject: SV: [PHP-DB] i am lost (php warning)
Date: Tue, 18 Jan 2005 09:15:01 +0100
Hi,
Probably because $user is not i
so what exactly is the problem?
bastien
From: "mel list_php" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] mysql - image storing
Date: Tue, 18 Jan 2005 11:30:12 +
Hi list,
I try to store/retrieve pictures into MySQL.
I know that a lot of people will say this is not a good pract
On Tuesday 18 January 2005 19:30, mel list_php wrote:
[snip]
> $donnees=stripslashes($row[donnees_binaires]);
[snip]
> -I tried different combinations with addslashes/stripslashes, trim in case
> of spaces, mysql_real_escape_string...
I haven't looked at your code in detail but stripslashes()
The problem is that I just display the "image broken link" icon.
As I told before the image is displayed fine into phpMyAdmin, so I think the
problem is really in the retrieval script, but I can't see where...
I tried with several browser, so that's not the question either...I also
tried with sev
Jason, can you explain why stripslashes should not be used on data
taken from the db? when you store data in the db i thought it was good
practice to addslashes, when you retrieve from the db, you will need
to use stripslashes to remove the extra \
--
Joseph Crawford Jr.
Codebowl Solutions
[EMAI
> Jason, can you explain why stripslashes should not be used on data
> taken from the db? when you store data in the db i thought it was good
> practice to addslashes, when you retrieve from the db, you will need
> to use stripslashes to remove the extra \
If I may step in...
Assuming a MySQL d
Joseph Crawford wrote:
Jason, can you explain why stripslashes should not be used on data
taken from the db? when you store data in the db i thought it was good
practice to addslashes, when you retrieve from the db, you will need
to use stripslashes to remove the extra \
The slashes are added for t
On Wednesday 19 January 2005 01:51, [EMAIL PROTECTED] wrote:
> > Jason, can you explain why stripslashes should not be used on data
> > taken from the db? when you store data in the db i thought it was good
> > practice to addslashes, when you retrieve from the db, you will need
> > to use strips
Martin Norland wrote:
Joseph Crawford wrote:
Jason, can you explain why stripslashes should not be used on data
taken from the db? when you store data in the db i thought it was good
practice to addslashes, when you retrieve from the db, you will need
to use stripslashes to remove the extra \
The
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 18 January 2005 17:11, Joseph Crawford wrote:
> Jason, can you explain why stripslashes should not be used on data
> taken from the db? when you store data in the db i thought it
Joseph Crawford wrote:
Jason, can you explain why stripslashes should not be used on data
taken from the db? when you store data in the db i thought it was good
although 'slashing' text works pretty much all of the time (possibly the
guys using exotic encodings all day will say different :-) but t
I agree with your theory of the possibility that the cli version of php is
using a different ini file than the
apache2 module/cgi. I have no clue as to how to confirm that or to correct
it though, and advice there?
I do restart Apache anytime I make config changes, hasn't seemed to have
helped at
On Tuesday 18 January 2005 19:18, Jochem Maas wrote:
> I was always under the impression that single quotes (assuming you are
> delineating you args with single quotes) should (officially) be escaped
> with another single quote - although backslash also works:
I think it depends on the database th
Jochem Maas wrote:
I was always under the impression that single quotes (assuming you are
delineating you args with single quotes) should (officially) be escaped
with another single quote - although backslash also works:
"INSERT INTO status (hunger) values ('I''ve just eaten.');"
...alot of real
Log In'){
$user=$_POST["email"];
$pass=$_POST["pass"];
if(!$sql_query = mysql_query("SELECT * FROM cm_customer WHERE
emial='".mysql_real_escape_string($user)."'")){
//This will let you know if there is an error in your query. I do
not recomend leaving this here when when it is live.
d
Hi,
I've got a problem concerning inserting UTF-8 encoded data into a MySQL
4.1.9 table.
I'm working on a simple DOM based XML feed parser in PHP5; I need to insert
the data parsed from the feeds into the table.
The script source can be viewed: http://www.feedsfarm.com/tmp.phps
Most
Mysql> LOAD DATA INFILE '/tmp/jokes.txt' INTO TABLE jokes FIELDS
TERMINATED BY ''
http://dev.mysql.com/doc/mysql/en/mysqlimport.html
http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html
Jeremy Shovan
-Original Message-
From: Ruprecht Helms [mailto:[EMAIL PROTECTED]
Sent: Monday, January 17,
No, really really , don't do this. Store the path to the image.
You then load the path into PHP and use
header("Content-type: image/jpeg");
readfile($path_from_database);
exit;
Then .htaccess the *actual directory* you store the images in so it's
hidden from browsing.
Only allow authorised people
Hi Guys,
Just to throw my 2 cents in...
The application requirements drive how you handle images in a db...sometimes
you simply don't have the choice (though filesystem storage is better IMO).
My work app / clients require that we store images (and other media or
documents) in the db.
So while
Simon Rees wrote:
On Tuesday 18 January 2005 19:18, Jochem Maas wrote:
I was always under the impression that single quotes (assuming you are
delineating you args with single quotes) should (officially) be escaped
with another single quote - although backslash also works:
I think it depends on the
Martin Norland wrote:
Jochem Maas wrote:
I was always under the impression that single quotes (assuming you are
delineating you args with single quotes) should (officially) be
escaped with another single quote - although backslash also works:
"INSERT INTO status (hunger) values ('I''ve just eate
29 matches
Mail list logo