Rodrigo,
Check the PHP-DB archives from yesterday and the day before. Lots of
comments about this very subject.
Happy hunting.
Rich
> -Original Message-
> From: Rodrigo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 2:32 PM
> To: PHP
> Subject: [PHP-DB] I need some in
Not sure here, but you might also run into a problem if you start your if
statement with $i=0. If PHP does not treat the value 0 as even or odd, your
first row is most likely going to be purple along with your second row. I
know it's nitpicky, but I could see myself spending half an hour trying to
What's you register_globals set to?
> -Original Message-
> From: Thomas "omega" Henning [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 12:49 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Need help urgent!!
>
>
> I'm using PHP4.2.2 Win with MySQL 3.2.52 Win and PHP does
Can somebody tell me what I might be doing wrong in the code below? I'm
trying to use a function to perform an often-used db query and return the
resulting resource to the calling script. I keep getting this error though:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$'
Sorry, line 51 is the one that reads:
$1contentID=$row["1contentID"];
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 4:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Return Array
save you some. ;)
Thanks for the help.
> -Original Message-
> From: Dave Smith [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 4:31 PM
> To: Hutchins, Richard
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Return Array from Function
>
>
> T
Without more detail about your code, my first guess would be your
register_globals setting in php.ini. In PHP 4.2.x it's set to OFF which
means you have to refer to your variables like this example:
$_POST["varname"];
> -Original Message-
> From: Brendan Flynn [mailto:[EMAIL PROTECTED]]
>
rename your select lists with array brackets at the end
'listbox1[]'
all of your values will be passed to the next page as an array
> -Original Message-
> From: Wilmar Perez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 12:47 PM
> To: php-db mailing list
> Subject: [PHP-D
FYI...
Not sure what your intentions are, but you can also send the form data from
ANY form by putting the mailto:[EMAIL PROTECTED] statement in the action
property of the form and using the POST method (I don't think it'll work
with GET).
You'll generate an e-mail with an attachment that contai
OK, so this probably is a bit off topic, but the results of these actions
will be placed into a MySQL database. Close enough?
I have a object named list[] that is passing its
selected contents to an array. That part works fine. I can use a for loop to
grab all of the selected items. Where I'm st
John (and list),
Do you know if MySQL 4.0.x and PHP 4.2.x are fully compatible? I'm
interested in the topics you have been discussing in this thread and don't
really want to pursue upgrading MySQL if the support is only "experimental"
at this stage (i.e. Apache 2.0).
Thanks,
Rich
> -Origina
This has been asked many times before, but unless you have a really good
reason for storing the image in the database, don't. Instead, upload the
image file to a directory on the server and store the URL to the image in
the database. Fewer db resources are consumed.
> -Original Message---
Dave,
I'd agree with Rob especially about returning the results.
Plus it's always a good idea to add error checking to your SQL statement.
Try replacing your existing line of code with this to make sure you query is
actually returning valid results before trying to operate on them.
$gnlistres =
Something like this should also work for you.
".$var1."".$var2."";
}
?>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:Tony72284@;aol.com]
> Sent: Thursday, October 24, 2002 10:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] DB Print Columns and Rows
>
>
>
>Hello P
Sorry, fixed a syntax error in my original post.
> -Original Message-
> From: Hutchins, Richard [mailto:Richard.Hutchins@;GetingeCastle.com]
> Sent: Thursday, October 24, 2002 10:59 AM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB]
In addition to what Mihail had to say, I saw a couple of minor things as
well. I'm not sure if they're the cause of or solution to the problem you're
experiencing.
First, I'm pretty sure that a value of value=\"Y\" is not valid HTML. I
don't know what it does to your name/value pair when you POST
What about wrapping your logic in a counter? Set $count=1,
if($count=1){do_this; then $count++;} else{do_that}. Wouldn't really add any
overhead to your script since the counter only gets incremented once when
the if() statement is true then stays at 2 and executes the else{} stuff
after that.
Pre
Just to weigh in on the tail end here, a FAQ of the top N items would be
nice. But I have to say, I use the archives a lot before I post to the list.
The archives contain the answers to most questions out there. If subscribers
to this list checked the archives to see if their answer is there, then
ctsplus.com]
> Sent: Wednesday, November 06, 2002 10:42 AM
> To: Hutchins, Richard; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] sort by date
>
>
> What archive and how do I access it?
>
>
> -Original Message-
> From: Hutchins, Richard <[EMAIL PROTECTED
It would seem that your IF statement, as it is written below, evaluates to
true every time because I'm guessing that the hexadecimal value of the
string timeb is larger than the hexadecimal value of timea. Like I said,
just a guess.
I'm also guessing that you actually want to compare two values fr
I'm pretty sure all you have to do is name your select as an array like so:
Your selected values will come across as an array called $icon.
If you need more info on this and how to use it, there's lots in the
archives. That's where I found the info I needed.
Good luck.
Rich
> -Original
I don't know what your application or requirements are, but here's something
to think about...
If each pay period will ALWAYS be in two week increments from the date you
hard code, then you're fine just hard coding the first one and incrementing
automatically after that. However, if you're in one
The link for your image:
Click Here
The code for displaypage.php
blah...
"
?>
Something like this should be all you'll need. A little more HTML here and
there should help you position and size your image.
Hope this helps.
Rich
> -Original Message-
>
Sounds like a looping problem in your code. Can you supply the code around
your INSERT statement so we can see what's going on?
The only times I've experienced anything Roswell about MySQL is when I've
written bad code.
Rich
> -Original Message-
> From: Toby Parkins [mailto:toby@;uknetwe
Looking at the code you've pasted in below, I don't see anything that would
result in one valid row plus additional blank rows.
Is the code you supplied in a script with any control structures like IF,
WHILE, or FOR? Is it included into a script in the middle of a control
structure? If you answere
Aaron was right initially:
$sql = "select * from ietsfuckingfriday";
$result = mysql_query($sql);
$num_rows=mysql_num_rows($result);
Somewhere along the line, things got convoluted, but that's how you check
for 0 rows returned from a query.
> -Original Message-
> From: Snijders, Mark [
Can you explain how e-mail fits into the Admin solution? What is the e-mail
used for? Setting up the accounts/passwords or sending the account/password
to the user?
> -Original Message-
> From: Aaron Wolski [mailto:aaronjw@;martekbiz.com]
> Sent: Friday, November 15, 2002 11:39 AM
> To: 'A
ot necessarily be the BEST solution, but I've seen it used in various
places.
> -Original Message-
> From: Aaron Wolski [mailto:aaronjw@;martekbiz.com]
> Sent: Friday, November 15, 2002 11:47 AM
> To: 'Hutchins, Richard'; [EMAIL PROTECTED]
> Subject: RE:
I'm having problems with a query. The query as it reads in my code is:
$sql_element_low = "UPDATE $table SET medialow=NULL WHERE
".$_POST["tbl"]."contentID=".$_POST["id"]."";
All of the varibles get passed as expected. I know this because if I echo
the SQL out to the page, I get:
UPDATE levelone
d here. Everything SEEMS to be right.
> -Original Message-
> From: Marco Tabini [mailto:marcot@;inicode.com]
> Sent: Friday, November 15, 2002 3:52 PM
> To: Hutchins, Richard
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Query Executes in MySQL Command Line, Not From
> P
This is so frustrating.
> -Original Message-
> From: Marco Tabini [mailto:marcot@;inicode.com]
> Sent: Friday, November 15, 2002 4:14 PM
> To: Hutchins, Richard
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From
> PHP.
>
ee of four).
> -Original Message-
> From: Hutchins, Richard [mailto:Richard.Hutchins@;GetingeCastle.com]
> Sent: Friday, November 15, 2002 4:31 PM
> To: 'Marco Tabini'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not F
Rasmus,
Peter and I were discussing the use of ".$myvar." vs "quoted string {$myvar}
more quoted string" in a separate thread.
Is there a performance or compatibility advantage to using the concatenated
version as you suggest in your message below?
I currently use the concatenated version in al
I've read the other posts and agree with them wholeheartedly - sounds like
you actually should investigate using some sort of relational db, MySQL or
otherwise.
However, if there is some major reason you don't or can't use a relational
database, you may want to consider storing your flat files as
You might also want to look into using addslashes($path), especially if
you're going to be accepting this path info from a text box.
http://www.php.net/manual/en/function.addslashes.php
> -Original Message-
> From: Steve Cayford [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002
Not only does Mike's description below work really well for a single page,
if you write all of your JS stuff like this, you can very easily use the
same script on multiple pages. Portability! Works great for me.
> -Original Message-
> From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
> Sen
Click="javascript:myfunction(objectName)") as long as the function is
included in the page.
Sorry for any confusion.
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 1:45 PM
> To: [EMAIL PROTECTED]
> Subject: RE
I think it's because you're incrementing $a BEFORE you echo it out. That
would cause your echo statement to start at the second item [1].
> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 3:36 PM
> To: '1LT John W. Holmes'; 'Ry
If you have a variable: $myArray = array();
Can't you clear it by saying unset($myArray)? According to the
documentation, it looks like you should be able to.
> -Original Message-
> From: Dave Smith [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 1:12 AM
> To: karthikeyan;
ugh to accomplish (theoretically), but I've never actually done it
before, so I'm not versed in the ins and outs of unsetting elements of an
array.
http://www.php.net/manual/en/function.unset.php
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Se
You're also, at the very least, going to want to escape out the characters
in the HTML code that could cause problems with your query (e.g. ", '). To
do this, you'd use the addslashes() function prior to inserting the data
into the database.
> -Original Message-
> From: Adam Voigt [mailto
Actually, according to the MySQL manual and experience, if you don't want to
insert data into each column in a table, you can specify the columns you DO
want to insert data into. See below:
$sql = "INSERT INTO myTable (col1,col3,col4) VALUES
('$val1','$val2','$val3')";
As you can see, the above q
You're missing the
mysql_query($sql) or
die(mysql_error());
to actually fire the data into the db.
Hope this helps.
> -Original Message-
> From: John [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 3:50 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Here goes!
>
>
What kind of table? Can you provide your table creation script or the output
of mysql>describe tablename;
> -Original Message-
> From: mike karthauser [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 9:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Enlarging tables
>
>
> W
By definition a tinyint has a value from range -127 to 127. Try using a
smallint instead.
> -Original Message-
> From: mike karthauser [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 9:56 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Enlarging tables
>
>
> on 9/12/02 2:
Premature clickage...
Or you could use a mediumint or int. Just check the mysql manual and select
the int type that suits the size of your db best.
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 9:56 AM
> To:
Eddie, whenever I start having problems with variables, I drop this code in:
begin code snip...
\n\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n\n";
// dump_array() takes one array as a parameter
// It iterates through
List,
I've been looking on and off for now for a class or plug-in or something
that will allow an application user to define table specifications (#rows,
#columns, spanning, etc) then allow them to enter table data (headers, body
data, title, footer, etc.) in a graphical representation of the tabl
Look at the tinyblob (tinytext), mediumblob (mediumtext), blob (text),
longblob (longtext) column types in the MySQL manual. Storage-wise they
don't look too terribly inefficient.
-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:18 AM
To: [
I'm pretty sure the .dk on the end of his e-mail address means Denmark. Glad
you guys were confused too. I was afraid that last shot of Tequila at the
bar last night really screwed me up.
> -Original Message-
> From: Snijders, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 12,
Try:
SELECT some_column FROM some_table WHERE column_value IS NOT NULL AND
unit_ID=$variable
If that's kind of what you're looking for, there's good info in the MySQL
manual about the WHERE condition and other sorting and selecting options.
HTH
> -Original Message-
> From: Alex Francis [
I think it's because mysql_list_tables returns a resource identifier
($result). You have to iterate through the resource identifier ($result)
with a while() loop to get the actual table names out. From the PHP.NET
site:
In the example above, I think the output would just be one table name.
Howev
Try addslashes($varname). Check PHP.NET for addslashes.
> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 11:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Inserting URL into table
>
>
> Hi,
>
> I'm trying to insert a URL into
Jose,
In addition to any advice you may receive from your post today, check out
the PHP archives. I distinctly remember a discussion related to these models
maybe a month back that may be of interest to you. Don't remember if it
dealt with your specific concerns, but I'm pretty sure it dealt with
I think you're going to have to post some code for this one.
If your database holds the exact data you're expecting, show the code that
is building the link on your page after it is retrieved from the database.
If the link in the database is wrong, show the query that inserts it into
the database
How would the online table be maintained if a user simply closes out the
browser without actually logging out properly? I'm not at all experienced
with sessions, but closing the browser should terminate the session,
correct? Bernain may want to delete from his online table every hour or so
to catch
I know when I first started working with a host that provided MySQL support,
there was a very specific path I had to use in the connection string because
"...the MySQL server is behind a very strict firewall." If I didn't use the
path exactly as their prototype indicated, I'd get errors like you ha
I'm pretty sure it is possible. Unless I'm wrong, PHP, by default, is
compiled with MySQL support. So, what you're seeing could be a result of
that default condition. Just because it's compiled with support for MySQL,
doesn't necessarily mean that they will provide the database server.
Please, oth
I use logic like this to avoid this problem:
Submit data from form to a separate PHP script that handles the database
submission then forwards to a results page which queries the database for
the information from an ID passed along with the page forward.
If you do this, when you refresh the resul
Post your SQL statement.
> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 1:37 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Stumped...
>
>
> I am getting an error that is proving very difficult to
> isolate and
>
If you update $date and nothing else on the page, are any of the other
values in the URL (HREF) set? You have two separate forms. $date is in one
and $host is in the other. However, all of the other variables in your URL
(HREF) are from the second form where $host is. My guess is that since you
ha
Just a side note in case it's important, mysql_num_rows() is a PHP function,
not a native MySQL function. Not being nitpicky, but it might be relevant
if, for some reason, Damir cannot use PHP to obtain the number of rows. From
the tone of the original post, it seems that might be a possibility.
>
It does not appear that you have posted the code from the add.php page in
your original post (below). From the error messages you provided, that seems
to be where the error is happening. You'll need to post the add.php code and
identify line #23 for us to be able to help.
> -Original Message--
Fred,
I don't have much time today, but here is my initial assessment of what
might be going wrong with your page:
You display add.php which draws a form for data.
You submit that form to add.php (itself).
The form redraws inside the page.
You get errors when add.php looks for data in the $HTTP_P
Could you please identify which line of code is line 16?
> -Original Message-
> From: zmn [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 20, 2003 10:16 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] ghost parse error?
>
>
>
> Why in the first place do you break you php and start
I'm pretty sure that the error is because you're not able to set a length
for the TEXT column type. I checked the MySQL manual and it does not show a
prototype with that optional parameter. Besides, if you want a TEXT of
(255), why not just use a VARCHAR (255)? They're essentially the same thing
an
What do you mean the code doesn't work? How is the code behaving? What kinds
of errors are being returned by the interpreter? Is your register_globals
set to ON or OFF? Are you certain you have access to the directory in which
the file you wish to open is located?
> -Original Message-
> Fr
When you go through the URL, you're using GET, not POST. ALl you really have
to do is this:
$parcel_query = "SELECT * FROM land01_02_03 WHERE (PelNumber LIKE
".$_GET["number"].") AND (OnerName1 LIKE ".$_GET["number"].") ";
Then you can drop the while loop that extracts the variables from the HTT
Tell us specifically what the parse error is reporting to you and
specifically what line is line 34.
> -Original Message-
> From: David Rice [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 2:53 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] need help spotting this php parse e
In your second e-mail you posted the error message, but failed to identify
line 34. This is important so we can tell what code the parser is gagging
on. Otherwise, it's going to take longer to get an answer because we're
guessing which line is line 34.
> -Original Message-
> From: David Ri
Try searching www.phpclasses.org. I'm almost positive it's been written
before and if it exists, this is a great place to start looking for it.
> -Original Message-
> From: Shahar Tal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: [P
So I read this thread and the MySQL doc on mysql_insert_id() and still have
a related question.
Does mysql_insert_id() function on a per-connection basis? I read the stuff
on last_insert_id() and it specifically mentions that the last ID is stored
on the server on a per-connection basis. However,
> The one thing that jumps out at me is that if you insert multiple
> rows at the same time with an insert statement,
> LAST_INSERT_ID() returns the
> value for the first inserted row only, whereas
> MYSQL_INSERT_ID() returns the
> last id inserted. Am I reading that right?
Yeah, that's the way
Yeah, it's a configuration directive, check here:
http://www.php.net/manual/en/configuration.directives.php#ini.upload-max-fil
esize
If you're moving 10MB, is it possible to use FTP instead? Don't know your
situation. Just a suggestion.
> -Original Message-
> From: Ryan Holowaychuk [mail
Post your code.
> -Original Message-
> From: Chris Deam [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 2:27 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] PHP-WIN MYSQL Double results
>
>
> Please help:
>
> I am getting double results when loading an html/php page. I am
Try this:
After this line:
> $prcp = mysql_query($pquery);
add this line:
print_r($prcp);
(For additional info: http://www.php.net/manual/en/function.print-r.php)
What that should do is print the results directly from your query (which are
stored as an associative array) before anything else is
You could also look at a site like javascript.internet.com and look up a
pre-written phone number validation script and do the validation on the
client side in addition to or instead of doing it on the server side.
One reason you may want to consider doing client-side validation for
something like
Regardless of the final decision (directory vs BLOB) this topic is covered
just about every week on this list. If you check the archives you'll find a
wealth of information out there regarding uploading, storing and retrieving
images and the benefits and disadvantages of each possibility.
If you'v
Simple MySQL.
After your ORDER BY clause use either ASC (I think this is the default) or
DESC. I'm pretty sure this'll work on date fields to produce the results you
want.
Your query will end up looking like:
"...order by createdate DESC"
> -Original Message-
> From: Addison Ellis [mailt
Have you correctly updated you web server's .ini file to point to the PHP
installation according to the PHP installation instructions?
> -Original Message-
> From: Tomas Liendo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 03, 2003 10:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB]
What about:
count($arrayname)
Should tell you how many items are in an array.
> -Original Message-
> From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 4:04 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] checking for empty array from a form field?
> gr
ilto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 4:53 PM
> To: 'Hutchins, Richard'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] checking for empty array from a form field?
> grrr!
>
>
> Ok... well
>
> When I select the "select product" whi
1. This question has nothing to do with PHP or databases.
2. Adobe already thought of it: Adobe Acrobat 5.0.
> -Original Message-
> From: Baumgartner Jeffrey [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 10:13 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] collaborating on
pdating in real time (and completely wouldn't work), I would say, yes,
two frames should work, but you might even want a third (hidden) at the
bottom that never stops executing, just pulling entry's out when new ones
are added, and use javascript to add them to the right frames with
If I understood your question, you can use a JavaScript to take care of the
submission for you. Hitting Submit is a client side action, so you have to
handle it in the browser instead of on the server with PHP. Maybe something
like checking to make sure all fields are valid with an onBlur() script.
A quick trip through the MySQL manual hints that you may have to use forward
slashes in your path on a windows system. So...
LOAD DATA LOCAL INFILE 'C:/WINDOWS/TEMP/phpC255.TMP' INTO TABLE
abonnes FIELDS TERMINATED BY ';' ESCAPED BY '\\' LINES TERMINATED BY
'\r\n' (dp_indpri,dp_nom,dp_ville)
.
Just forwarding this on to the general list as it was only sent directly to
me.
-Original Message-
From: karthikeyan.balasubramanian
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 9:03 AM
To: Hutchins, Richard
Subject: Re: [PHP-DB] [Import text file]
try using something
Try referring to your variables as:
$_POST['submit1'] and
$_POST['vname']
Then check our register_globals on php.net to find out why.
I'm pretty sure that's what the problem is.
> -Original Message-
> From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 1
> > Cumprimentos
>
> What'd you call me?
Sometimes it's the simple things that make you laugh the hardest. Thanks,
John.
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 10:37 AM
> To: Bruno Pereira; [EMAIL PROTECTED]
> Subjec
Dude, you just topped John! That was laugh-out-loud hilarious. Sorry this
has gotten off-topic, but c'mon. A "freshmaker"? Classic, just classic.
Rich
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 12:09 PM
> To: [EMAIL PROTECTED]
> Subjec
Remove the comma at the end of this line:
> cat_name = '$cat_name',//remove this comma
> -Original Message-
> From: Alawi shekh albaity [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 01, 2003 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Update errors
>
>
> What wrong with this
You could store it as a series of comma separated values in a text field and
manipulate it using implode() and explode() on the comma separators. I've
done this for small arrays and it works OK. WOuld like to know if there's an
easier way though. Not that this is all that bad. I'm just lazy. ;^)
H
Michelle,
You said you've tried tutorial after tutorial. What specific problems are
you having? What kind of database are you using? Have you architected the db
yet? We can't help much if we don't know what specific problems you're
having (e.g. db connection problems, PHP parse errors, unexpected
Just a guess, but do you have a variable (global variable) named $15
someplace? If you do, PHP does not allow variable names that start with
numbers.
> -Original Message-
> From: AP Fritts [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 3:51 PM
> To: [EMAIL PROTECTED]
> Subject
You need to create a column in the target table similar to:
custID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT
When you run your INSERT query, you pass NULL to that column and the ID will
be created/auto incremented for you.
Is that what you mean?
Rich
> -Original Message-
> From: D
Coming from a non-programmer...
If you were to take the cars' IDs and put them in an array named for the
track a specific group of cars is on, that would give you indexes, thus
positions, from 0-N depending on how many cars are there. Any time you have
to add or delete cars, you should be able to
Good stuff here.
http://www.mysql.com/doc/en/Date_and_time_functions.html
Check out the SELECT DATE_ADD section. That might be what you're looking
for.
HTH,
Rich
> -Original Message-
> From: David Rice [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 04, 2003 9:36 AM
> To: [EMAIL PROTEC
I have an array of values I want to store in a MySQL db in a column called
readBy of type TEXT. I want to take that array and serialize it then insert
it into the db. No big deal. When I query the db and get the value from the
readBy column, I know I have to unserialize it. Again, no big deal.
My
the comparisons I need
to do inside other queries. Which I don't mind, I was just hoping
serialize()/unserialize() would make life easier.
Lesson learned.
Thanks,
Rich
> -Original Message-
> From: Gerard Samuel [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 04, 2003 1:39
Can somebody please tell me why the $displayThese variable in the code
snippet below only gets populated with the last value in the $newsList array
even when $newsList has more than one row of data?
while($newsList = mysql_fetch_array($result_getNews)){
if(
101 - 200 of 305 matches
Mail list logo