fopen()
fwrite()
fclose()
-Original Message-
From: Raymond [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 12:05 PM
To: Frank Flynn; [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Making a txt file from db data, is it possible?
Hi!
Ok, I think I maybe have to explain this a little
When you say ...account for either a numeric or NULL value ..., do you
mean SELECT a value that could be NULL?
If so, the query is SELECT * FROM mytable WHERE cusa IS NULL || cusa = 0
-Original Message-
From: Zach Curtis [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 9:11 AM
[cusa]; \\ repeat for
each variable
else $cusa = NULL;\\ repeat for each variable
$query = INSERT INTO mytable (cusa,cusb,cusc) VALUES($cusa,$cusb,$cusc);
?
-Original Message-
From: Zach Curtis [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 9:29 AM
To: Rick Emery
Using VALUES() is faster
Nothing really wrong with SET clause, though
-Original Message-
From: Zach Curtis [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 10:34 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Insert, Arrays, Null
Terrific! I tried an example
jas,
Ya didn't do what I told you to do. Now, do this:
SELECT NAME=\files\;
$sql = UPDATE $table_name SET file_name=\$files\;
-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Stuck on db entry from
I had a typo:
$sql = UPDATE $table_name SET file_name=\$files\;
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:29 PM
To: 'Jas'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Stuck on db entry from select box...
jas,
Ya didn't do what I told
, 2002 12:51 AM
To: Rick Emery
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Submitting Dynamic Form
Ah, I just knew there must be an easy way of doing it. Thanks Rick !
Is there a good reference on stuff like this with some examples ?
Am I pushing the friendship ? :-)
Rick Emery wrote
Ron,
What problem are you having? I'm looking at your code, and it's so clean, I
could eat off of it.
My only suggestion would be that $month will NEVER == NULL. If you are
testing for NULL, the test is:
if ($month == NULL )
Second, $month will be assigned a value, so it will never be NULL
Can you use a cron (Unix) or at (Windows) job to dump the dbase data to a
comma-separated-value table? Then suck up the csv into the mysql databasde.
-Original Message-
From: Marij Bellen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 8:37 AM
To: '[EMAIL PROTECTED]'
Cc:
]]
Sent: Thursday, April 04, 2002 8:41 AM
To: Rick Emery
Subject: RE: [PHP-DB] Database Sorting by date
The query fails when I try to look at a month it says Query Failed
Ronald L. Allen (MCSE NT, MCP, CCNA)
SR. LAN/WAN Administrator
SFOR - Hungary, Croatia
[EMAIL PROTECTED]
[EMAIL PROTECTED
Josh,
Your question is too vague to answer.
Do you know mysql?
Do you know PHP or PERL?
If not, learn these, then ask.
If so, create code, then ask
-Original Message-
From: Evans, Josh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:31 AM
To: [EMAIL PROTECTED]
Subject:
cron is an application/utility on ALL unix servers. It is used to execute
ANY unix command or script at specified dates, times, etc.
type the following to learn more:
man cron
man ctrontab
your cron job would execute the command to translate the dbase file to sql.
Then execute mysql to read in
Jason,
If you don't have one, I would also recommend a good book that combines PHP
and MYSQL interaction. I would strongly suggest the one I cut my PHP teeth
on:
PHP Essentials by Julie Meloni
-Original Message-
From: Julie Meloni [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04,
$post = ereg_replace((.*) ,\\1, $old_post);
If you want to search mysql for this that is something else
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 10:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Please help count ?
Hi All
I
change:
$Location_Info = mysql_fetch_row($result);
to:
$row = mysql_fetch_array($result);
$Location_Info = $row['fieldname'];
replace fieldname with the real name of your database field
-Original Message-
From: Jason Tobias [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:29
show your code
-Original Message-
From: Ron Allen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 5:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Problem with the beginning variable
I have a problem with the inital load of my page
When it loads it says that the variable is
select PERIOD_DIFF(DATE_FORMAT(2002-04-01,%Y%m),
DATE_FORMAT(2001-0801,%Y%m) ) as dd;
+--+
| dd |
+--+
|8 |
+--+
1 row in set (0.00 sec)
-Original Message-
From: John Hughes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 2:28 AM
To: [EMAIL PROTECTED]
Subject:
what command are you using?
When posting questions, give all details...wee can't read your mind
-Original Message-
From: Daniel Broome [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 9:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] autoincrement
I am trying to add auto
SELECT * FROM mytable ORDER BY some_field DESC LIMIT 1;
-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 7:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Return the last record on database
My database has several records an ID is the primary key
I
while( $row = mysql_fetch_array($result) )
{
}
-Original Message-
From: Natividad Castro [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 2:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] end of file
Hi to all,
how can I handle when the recordset reach the last record?
is it
Jason, this is intriguing.
Please show us a bit more code before the mysql_query() call.
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:54 AM
To: Php-Db
Subject: [PHP-DB] MySQL/PHP Update
I'm trying to update my MySQL database, but it
I'm trying to decipher:
when I select the record to edit the drop-downlist has
the first option as the value instead of what the corresponding
StateID in
the column reads. How can I correct this? The form to insert and
edit have
the below code and correctly
You need to ensure that mysql.sock has the correct read-write-execute
permissions
Check the mail list archives; this question is asked and answered EVERY week
-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:17 PM
To: [EMAIL PROTECTED]
show you code and db table struct
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Very wierd problem ;-(
Hi All
I will try and explain as clearly as I can
I have a message board
did you start each include file with:
?php
?
If not, PHP treats the code within as straight text
-Original Message-
From: Brad Melendy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 5:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] include() statement hell!
Ok, I've spent
I suggest subscribing to the mysql mailing list and asking the question.
[EMAIL PROTECTED]
-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 7:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] procedures?
Hi there,
Where can I find information
There's a bunch of ways to accomplish what you request. Therefore, I'll
offer what I would do. Other folks, more brilliant than, will provide
better ideas.
1. Do you have access to the mail server? For instance, I run qmail on my
SOHO system and, therefore, have full sys-admin rights. If
if you are using mysql 4.x, you might try:
DELETE answers FROM exam e, questions q, answers a WHERE
a.question_id=q.question_id q.exam_id=e.exam_id;
I've not tested this, though.
-Original Message-
From: Andrés Felipe Hernández [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002
this solution will not work for mysql databases, as mysql does not support
sub-selects
-Original Message-
From: Bill Morrow [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:02 PM
To: Andr?s Felipe Hern?ndez
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] delete statement question
First: what error are you getting?
Second, make your code more readable and easier to debug:
$query = INSERT INTO usuario (USU_USUARIO, USU_CLAVE, USU_NOMBRE,
USU_EMPRESA, USU_DIRECCION, USU_TELEFONO, USU_CIUDAD, USU_DEPARTAMENTO,
USU_PAIS, USU_EMAIL, USU_REPCLAVE, USU_TIPCLIENTE).
VALUES
,
andres
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: Andr?s Felipe Hern?ndez [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 12:03 PM
Subject: RE: [PHP-DB] delete statement question
this solution will not work for mysql databases, as mysql does not support
First: cross-posting to multiple lists...not nice. Most PHP folks are on
both lists.
Second: your first sentence seems to indicate that unknowledgeable people
inhabit the PHP list, vice the PHP-DB list. H GRIN
Third: what error do you get when you get the parsing error?
-Original
store and validate a username and password with each user's info
-Original Message-
From: Ljungan [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] marking DB entries...
Im making an adressbook using PHP and mySQL.
I want each user
and
adressreg
???
/ljungan
Rick Emery [EMAIL PROTECTED] skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
store and validate a username and password with each user's info
-Original Message-
From: Ljungan [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22,
$query = SELECT myvalue FROM mytable WHERE some_condition;
$result = mysql_query($query) or die(Error: .mysql_error());
$srch = ;
while( list($myvalue) = mysql_fetch_array($result)
{
$srch .= $myvalue, ;
}
$srch = substr($srch, 0, -2);
$query = SELECT * FROM other_table WHERE this_val
What do you mean last record in a table? What are you REALLY trying to do
here? Do you want the last entry made according to a specific criteria?
-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 9:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re:
Huh
-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 9:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Relational database
But can you do that in PHP before you pull info from it
--
PHP Database Mailing List (http://www.php.net/)
To
SELECT * FROM mytable WHERE record_name REGEXP ^[a-h]
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 6:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Selecting Alphabetically
Hi,
Could anyone point me in the right direction with this one
use mysql_last_id()
-Original Message-
From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] LAST_INSERT_ID()
Hi,
In the PHP manual under the function mysql_insert_id() function they have
the following line:
The
I mean:
mysql_insert_id()
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:28 PM
To: 'Morten Nielsen'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] LAST_INSERT_ID()
use mysql_last_id()
-Original Message-
From: Morten Nielsen
first, it helps if you show us your REAL code. The query statement you
showed below would obviously not work (it's missing the mysql_query part.
Second, when executing mysql_query() ALWAYS include the or
die(mysql_error()) part to aid diagnostics.
Third, your query could not possibly work at the
if( strcmp($date,-00-00) )
{ do something}
-Original Message-
From: its me [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 12:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] date problem
i have an input field in a form that accept date called $date and in databse
i made it
MySQL does not currently support sub-selects.
The manual says:
DELETE [LOW_PRIORITY | QUICK] FROM table_name
[WHERE where_definition]
[ORDER BY ...]
[LIMIT rows]
Did you review the manual first?
-Original Message-
From: Riccardi Moreno [mailto:[EMAIL PROTECTED]]
Sent:
SELECT DISTINCT city FROM addresses;
-Original Message-
From: Kevin Diffily [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SQL Question
Hello,
I have a simple SQL Question. I would like to take the column city in
database
First: show us your exact query
Second: show us your exact error response
Third: show us your exact code and table structure
-Original Message-
From: Sander Peters [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 3:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] select rows from
Vieliecht:
SELECT kat_id,immo_id FROM immo_kat WHERE immo_id=318 (kat_id = '1' OR
kat_id = '35' OR kat_id = '34') ORDER BY immo_id;
-Original Message-
From: Michael Plies [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 4:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] how can i
it works for me. What do your data and table structures look like?
-Original Message-
From: Fredrik Wahlberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql LIMIT and ORDER BY problem
I have a strange problem with
First, what do you mean by regs?
If I understand your question, you want to know if mysql will re-use an old
auto_increment value that has been deleted. The answer is yes and no.
If you say: DELETE FROM mytable;
then the next insertion will cause the auto_increment value to begin at 1
If you
I tried the HAVING clause. it fails. This requires sub-selects or multiple
tables
-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 10:27 AM
To: Jonathan Underfoot; Rick Emery; [PHP-DB]
Subject: Re: [PHP-DB] SQL
Jonathan,
The original
Mate,
what code/function are you using to convert the dates?
what do your data look like in the table (structure, examples)?
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 8:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Problem
Huh
$query = CREATE TABLE mytable (.
field1 int,.
field2 varchar(50),.
field3 decimal(6,2),.
field4 int,.
field5 int );
mysql_query($query) or die(Error: .mysql_error());
-Original Message-
From: CrossWalkCentral [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 12:26 PM
How could you possibly have such a condition exist? That is, what relation
do the counts have to the contents of the name field?
What ARE you trying to really accomplish?
-Original Message-
From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 2:57 PM
To:
Have you spelled the name of the database correctly, including case
sensitivity?
What error message are you getting to indicate failure?
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 8:21 AM
To: Greg Donald; [EMAIL PROTECTED]
Subject:
, 2002 8:48 AM
To: Rick Emery; Greg Donald; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Problem connecting to db on Linux
Rick,
I snipped the code from my windoze system. I did have to change the case of
the dbname to reflect the Linux version (all lc).
The error message I got (not displayed on screen
is obvious?
George
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'George Pitcher' [EMAIL PROTECTED]; Rick Emery [EMAIL PROTECTED];
Greg Donald [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 18, 2002 3:19 PM
Subject: RE: [PHP-DB] Problem connecting to db on Linux
Do
resource in
/var/www/html/HERONweb/home.php on line 32
I have 'echo mysql_errno();' just after the query is called but no number is
being displayed.
George
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'George Pitcher' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 18
Are you saying you got two different return values with the exact same input
values for $hour, $minute, $second, $month, $day, $year??
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Time Difference
Your /table is inside your loop. So it is executed once to terminate the
table. After that, the browser just sees the rest as straight text.
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] formating
Further, I recommend replacing your echos with the following:
echo trtd width=\30%\BType Of Car: /B/tdtd.
$myrow['car_type']./td/tr\n;
echo trtd width=\30%\BModel Of Car: /B/tdtd.
$myrow['car_model']./td/tr\n;
echo trtd width=\30%\BYear Of Car: /B/tdtd.
$myrow['car_year']./td/tr\n;
echo trtd
You can't do this using PHP, because PHP is server-side. You will need
JavaScript.
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Disable Right click w/ php?
I have been looking on php.net for
?php
$t = date(m/d/Y h:i:s A, gettimeofday());
print $t;
?
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Time Question
Hi there. Got a bit of a snag. I'm migrating an ASP app to PHP with a
CORRECTION:
?php
$t = date(m/d/Y h:i:s A, time());
print $t;
?
--
C:\php -f a.php
02/14/2002 12:49:50 PM
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Time Question
Hi there.
addslashes() stripslashes()
Your question is vague...
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 1:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Form Validation
Anyone know of a good function to strip characters and stuff that would
Why are you iterating through the array? Why not just:
$start_id = $row[0];
$end_id = $row[count($row)-1];
-Original Message-
From: David Fudge [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] First and
change:
if ($submit) {
to:
if (ISSET($submit)) {
-Original Message-
From: Dan Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] undeclared variable error
Folks,
I am very new to PHP, and have been working through
try:
input type=text name=Body value=quot;?php echo $Body; ?quot;
Also, please include a sample field value and the results of our tests
-Original Message-
From: Faye Keesic [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 12:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB]
Need to show us more code.
For instance: where is $srchrow set?
Next, change:
if ($submit){
to:
if (ISSET($submit)) {
Why are you over-writing $name, $details, $price, $imgloc with list() before
you even use them?
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
change:
?php echo $PHP_SELF?
to:
?php echo $PHP_SELF;?
note the semi-colon
-Original Message-
From: Dan Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 2:34 PM
To: Rick Emery; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] undeclared variable error
Thanks Rick
What is the exact error you are getting?
I'm going to guess something along the lines of unidentified function
mysql_connect(). If that's the case, that means you do not have mysql
functionality compiled into your web server.
Speaking of which: what is your Linux system (RedHat SuSe, etc)?
FROM THE MANUAL:
mysql_fetch_row() fetches one row of data from the result associated with
the specified result identifier. The row is returned as an array. Each
result column is stored in an array offset, starting at offset 0.
Therefore:
print(option value=\$row[0]\$row[0]/option\n);
Re-read my previous email. You do not have mysql functionality compiled
into PHP and you web server. The clue is the phrase undefined function:
mysql_connect().
How did you load PHP, MYSQL, etc?
-Original Message-
From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday,
When you include $Select in your URL, did you remember to urlencode() it
first? If no, the spaces will blow your URL away...very nasty...
BTW, it helps if you post code.
-Original Message-
From: jeff akerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 11, 2002 4:27 PM
To: [EMAIL
select * from tablename where field NOT LIKE %A%;
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 12:39 PM
To: php List
Subject: [PHP-DB] Select rows where ?
Hi All
How do I select the rows that DO NOT contain a certain character.
I.e.
The question is: why use varchar? Why not use INT, then format to includes
commas when displaying?
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] numeric string problem
Hi,
I am using VARCHAR
Verify that $HTTP_REFERER is the URL the user was supposed to come from.
Somethig like (you may have to tweak it because I cannot test where I am
now):
if( strcmp($HTTP_REFERER,www.mydomain.com/login.html) )
{
header(Location: http://www.mydomain.com/login.html;);
exit;
}
Yes, you can re-select from the same database without opeing a new
connection.
I recommend that you print the contents od $newquery to verify it contains
the string you think it should. Perhaps the apostrophes you've enclosed the
$row[] variable are not expanding.
-Original Message-
[mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 5:42 AM
To: Rick Emery
Subject: Re: [PHP-DB] Can't get left join to work
Thank you! I'm obviously going to have to read up on that 'on ... '
syntax -
it's not something I'm familiar with.
Paul
Rick Emery wrote:
And the answer
$mystring = substr($mystring,0,-3);
- Original Message -
From: Renaldo De Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 8:56 PM
Subject: [PHP-DB] Need to delete charcters from a string
I need to delete the last 3 character of
You were close:
$mystr = substr($mystr, 0, -3);
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 7:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Need to delete charcters from a string
This dosen't quite do what i need, this
If you are certain the format will ALWAYS be as you indicate, then try:
eregi(width=([0-9]*) height=([0-9]*), $mystring, $reg);
$newstring = $reg[1], x .$reg[2];
NOTE: I don't have PHP here at work (I've got it at home). So you may have
to tweak this.
-Original Message-
From: Luke
First, the example you give will replace is with , if is is the ONLY
work in the line. You indicate this with the ^$ construct.
Are you trying to replace only the first occurrence if is?
-Original Message-
From: Desikan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 6:42
You don't need to use var_dump. Just use the following statements:
$newquery = mysql_query(SELECT * FROM local_shows WHERE
show_date='$row[show_date]' AND venue='$row[venue]');
print $newquery;
-Original Message-
From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]]
Sent: Friday,
Show us you table data
Show your PHP code as well
-Original Message-
From: Justin Hall [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple entries in database
I have worked my problem down to the mysql database.
I have
First, you don't have to write your own function to remove slashes. Simply
use:
$newline = stripslashes($oldline);
Second, write your lien containing slashes to the database. When you pull
it from the database, use stripslashes().
-Original Message-
From: Gary [mailto:[EMAIL
ceil($myvalue)
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Round a float to the next highest value despite the
value after the point
how can I round a float to the next highest
cookies
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] multiple query string
Help!
I'm designing a search page and I need to keep the search variable alive
even after i refresh the
sessions
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] multiple query string
isn't there any other way?
Rick Emery wrote:
cookies
-Original Message-
From: Renaldo
Yes, but the question is why?
-Original Message-
From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 1:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Query with numbers like 1, 3, 5..
Hi!
Is there a way to get the rows with id's like 1, 3, 5,
6902D 2002-03-01 5.00
6902D 2002-03-01 148.00
Q 2002-03-01 7.00
---
Rick Emery wrote ...
Show us your table structures and the data they contain.
It appears your WHERE clause probably acting correctly. But without data,
we can determine
Ya haven't given us much to go on. So...
SELECT DISTINCT * FROM mytable WHERE some condition;
-Original Message-
From: Justin Hall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 2:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] duplicate entries in db
I have a script that
two datarows in one:
do {
} while (mysql_fetch_array() );
?? or is this a stupid way to do it?
Reagrds Raymond
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Raymond Lilleodegard' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 8:55 PM
Subject: RE
two datarows in one:
do {
} while (mysql_fetch_array() );
?? or is this a stupid way to do it?
Reagrds Raymond
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Raymond Lilleodegard' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 8:55 PM
Subject: RE
The following means you have not opened a link to your database.
Concerntrate your efforts there.
Warning: Supplied argument is not a valid MySQL-Link
resource in /var/www/html/list.php3 on line 26
-Original Message-
From: Ken Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday,
$str = substr($str,0,-3);
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 1:57 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Need to delete charcters from a string
I need to delete the last 3 character of a string,
Jas,
Why are you initiating an UPDATE command when you've not changed the
information you wish to update?
For instance, if $c_name is blank, you display a message to enter the data;
yet, you DO NOT ASK the user to enter the correct information. Then, you do
an UPDATE statment to enter that
Yes, you can do that easily.
It is easier to answer your question if you show us your table structure.
-Original Message-
From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 11:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Is this possible?
Hi!
I
Lilleødegård [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 11:33 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Is this possible?
My table look like this:
Pricetable: (varetabell)
(varenr, type, pris)
VALUES
(1, '6inch', 29),
(1, '6inch meny', 51
CHANGE:
?
if ($Industry != ) {
echo $msg;
} else {
echo $contact_list;
}
?
TO:
if( mysql_num_rows($result) 0 )
{
echo $contact_list;
}
else
{
echo $msg;
}
-Original Message-
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 12:17 PM
To: [EMAIL
Mike is using MYSQL's REGEX; he's looking for a case-insensitive MYSQL
function function similar to PHP's eregi().
-Original Message-
From: Lerp [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 1:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Simple Search Function
Hi
Since you gave no real details of your table structure, I'll conjecture.
Assume city table and advert table is defined as:
CREATE TABLE city (
city_id int not null, auto_increment,
city_name varchar(50) default
)
CREATE TABLE adverts (
ad_id int not null auto_increment,
ad_text varchar(200)
1 - 100 of 286 matches
Mail list logo