ser to
connect from a specific host when you GRANT them permissions. Read the
MySQL manual about the GRANT command.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ome
other features? It's not worth it and security and customization can be
done just as easily with one database instead of many.
Bottom line: use a single database.
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (ht
Josh Acecool M wrote:
eval("?>" . $this -> The_Template_Sys . "Can you give an example of what $this->The_Template_Sys returns that is
causing the parse error?
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Dat
ers.ID
IN ( SELECT UNIQUE tblVideos.PerformerID
FROM tblVideos
WHERE 1 =1 AND tblVideos.Active = 'yes')
ORDER BY tblPics.ID DESC
LIMIT 0 , 6
What version of MySQL are you using? It looks like you're using a
version that doesn't support sub selects.
--
John Holmes
php|architec
Dylan Barber wrote:
4.0.16
Quote: Starting with MySQL 4.1, all subquery forms and operations that
the SQL standard requires are supported, as well as a few features that
are MySQL-specific.
http://dev.mysql.com/doc/mysql/en/Subqueries.html
--
John Holmes
php|architect - The magazine for PHP
"hkgx" or "bkkx" or "jktx"
next 4 characters - numbers 0 to 9
next 1 character - a dash "-"
next 3 characters - numbers 0 to 9
next 1 character - a dash "-"
last 2 characters - numbers 0 to 9
(sin|hkg|bkk|jkt)x[0-9]{4}-[0-9]{3}-[0-9]{2}
--
John
them?
^(sin|hkg|bkk|jkt)x[0-9]{4}-[0-9]{3}-[0-9]{2}$
Yeah, you should use them to ensure that the text is _only_ that code
and not just contains it. Otherwise "asdf sinx1234-123-12 asdf" will
pass. I just forgot. :)
--
John Holmes
php|architect - The magazine for PHP professionals -
he ?,?,? in your query have
parenthesis around it??
$sql =& $db->prepare("INSERT INTO ExitSurveyAnswers (session_id,
Question_id, answer) VALUES (?,?,?)");
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (htt
"\n\t {$data} ";
print "\n";
}
Thanks ahead of time for your thoughts and recipes :)
Grant
Are we doing your homework for you?
Why not just do this in your query?
SELECT bean_type, sum(number_o_beans)AS sum_beans FROM bags_o_beans
GROUP BY bean_type HAVING sum_beans > 100
nt-Type: text/html; charset=ISO-8859-1\r\n";
Not the best way to send an HTML message. It'll work on some mail
clients and not on others. Best way is to send a multi-part message.
Search Google for a tutorial.
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ufuk wrote:
Postgresql is running in my pc But i don`t use in php.
What am i doing?
Depends upon the OS, but you probably just have to uncomment the proper
"extension" line in php.ini and restart your web server.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84A
is that you have to come up with a method to clear the
cache. You can either clear it periodically (using cron, for example) or
clear it when there is a change to either of the two tables it's built
from (if you have control over those scripts).
--
---John Holmes...
Amazon Wishlist: www.
#x27;http' => array(
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded\r\n" .
'Content-Length: '.strlen($data),
'content' => $data
));
$context = stream_context_create($opts);
MTP = localhost
SMTP = 587
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
case.
Just ran through this _exact_ issue myself. Put the libmysql.dll files
in the windows/system32/ directory. That fixed everything for me.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Dat
ut my problem is that in SELECT query command after
each column name comma (,) is required and if i use the same than it is
displaying "You have an error in your SQL syntax near 'FROM form' at line
1"
How about showing us some code kind of hard to help without that...
--
27;SELECT ' . implode(', ', $chkboxes) . 'FROM form';
Just note that with either solution, someone can post a value of "*
FROM table WHERE 1#" and see everything in any table in your database.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BE
#x27;s put in the query**) or to 'some value', when there is a
values in $_FILES (note how there are quotes around the value if there
is one **when it's put in the query**).
Also notice how you're setting the "user_id" column to the _string_
'NULL' instead
nk to $webaddress, no matter what it's value is?
echo "Click Here";
Still following? Now, you want to display the address instead of "clicke
here", right??
echo "$webaddress";
Still following? I hope so. If not, you need to find an HTML mailing
list, if such a ho
x27;t work.
Any guidance, please.
Why don't you give an example of what you want, because I think you are
very confused.
Maybe English isn't your first language, but you're not making any
sense. WTF is an "onclick link" other an an tag?
This might require that you d
x27;d do it like this:
mysql_query("INSERT INTO " . TABLE . " (`id`,`name`) VALUES ('','$name')");
The other error you have, and I don't know how you think this code runs,
are the dollar signs before mysql_connect(), mysql_select_db() and
mysql_que
eporting()
function. I don't use PG, but you should be able to then use something like
pg_result_error() to capture errors like this and react accordingly.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
array function in PHP
5.0.1 - the code listed below works fine with PHP
4.3.2.
[snip]
function fetchArray() {
return(@mysql_fetch_array($this->result));
}
First troubleshooting step is to remove the @, set error_reporting to E_ALL,
and see if any errors, warnings, etc are shown.
---John Holme
lexity) or use a
database abstraction layer that simulates them. ADOdb comes to mind,
although I've never used that feature. http://adodb.sourceforge.net
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hing
like include once "http://domain.com/include.php"; would that even work?
It will work, but not like you're thinking. You'll get the _result_ of the
PHP file and not the actual code.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: "ioannes" <[EMAIL PROTECTED]>
");
$thisdate=date("d m Y",$next);
print($thisdate);
?>
I get
30 10 2004
31 10 2004
So what's the issue?
You could also use this:
print(date('d m Y H:i:s'));
print('');
print(date('d m Y H:i:s
From: "ioannes" <[EMAIL PROTECTED]>
When I run this code I get:
31 10 2004
31 10 2004
http://www.shortstay-london.com/testdates.php
Try printing out the hours, minutes and seconds along with the date and
you'll see the issue.
---John Holmes...
--
PHP Database Mailing Lis
rst - 1099177200 - I get 1099177200+86400=1099263600
[day after first day above], but this gives me 11pm on 31 Oct as above.
Daylight Savings Time strikes again!!!
http://webexhibits.org/daylightsaving/b.html
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscr
t time starts from - 0059 on 31
Oct. Then, adding 24 hours still leaves you in the same day.
There is an "I" tag in date() that'll return a 1 or 0 if it's DST and a flag
in mktime() to account for DST, also.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
se
error: parse error, unexpected ';' in
c:\inetpub\wwwroot\PTMemorandum6.php on line 89"
Fix the missing ) in this line:
Prob 2: Before the above error started, The
following
section was not creating 10 rows.
[snip]
That's because is outside of your loop...
---John Holmes...
--
PHP
gt;
Although it's missing a semi-colon...
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
like
this. Download both, implement both, run your own benchmarks and
determine which one works best for you. If you need a specific feature
set, then obviously choose the one that offers that.
I'd personally recommend ADOdb for no other reason than that's what I
use and it's effectiv
atures", etc... with nothing to actually back it up. Take opinions
for what they are, I guess. They're not really worth much when you have
specific needs like you've outlined above, IMO.
If your question leads to some benchmarks being done or a complete
comparison regarding fea
column name that is either a reserved word or
has special characters in it. If this is MySQL, it'll allow you to have
column named called "order", "desc", "foo bar", etc, and not complain during
the table creation. It will complain when it hits those reserved words in
the queries, though, so that's why you use the backticks.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ters in the lines above.
$db_host = "localhost";
etc...
and read this http://us2.php.net/manual/en/language.types.string.php
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
x27;/([0-9]{8})/','\1-',$number);
although that leaves a - character on the end to strip off. I'm sure there
are other ways.
If you want a query to do this, then other than being off topic, it'd help
if you told us what database you are using. Not everyone uses MySQL...
rray you can loop through.
This may not matter for your code if "$value" is different each time and
doesn't match any other form elements, though. How do you know this "doesn't
work"? If you do a print_r($_REQUEST), do you see any of your checkbox
values being p
server. You may have to get
permission or use special ports like the error message says. Why not set the
SMTP value in php.ini to the AOL SMTP server instead of trying to run your
own?
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.p
(total) AS total FROM T1 GROUP BY
clientid;
SELECT AVG(total) FROM tmp;
But can't use subselects with mysqlhow do I do it??
Sure you can... with the right version.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nothing really wrong with that query. You can
do that join this way, though, which may be more "proper":
SELECT u.username, g.group_name FROM user u JOIN group g ON u.id = g.id
WHERE u.id = 1
oh, and
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|archit
. If it just
lists a directory, then that's where PHP expects to find the php.ini file.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$_SESSION = array();
will clear the session. If you unset() it, I don't think it's written at the
end of the script, so your data remains. session_destroy() then probably
fails because $_SESSION is gone or you never called session_start() on the
page.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ot;";
echo $thissystem; //returns "C"
echo "";
If($z==$thissystem)
Try var_dump($z) to see if there are any extra characters returned in $z.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Petrus Ali Saputra wrote:
Petrus Ali Saputra wrote:
Is there anyone here can tell me how to access Matisse DB? Thank you.
Isn't there anyone can help me?
ODBC?
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professi
anyone can help it'd be
much appreciated.
preg_replace('/--(\w+)--/e','$$1',$code);
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Petrus Ali Saputra wrote:
John Holmes wrote:
Petrus Ali Saputra wrote:
Petrus Ali Saputra wrote:
Is there anyone here can tell me how to access Matisse DB? Thank you.
Isn't there anyone can help me?
ODBC?
Yes, but it will lower the ability of Matisse.
Sorry, you did not phrase that in the fo
ot;, set the "sendmail_from" to a
"charter.net" (for example) email address, then restart your web server and
things should work.
I'm no SMTP expert, so I can't tell you if any of this is the "best" way to
do it or not, though...
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
7;t going to fix anything.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nal security. If implemented correctly, they may
not be a bad idea, but they should only be used in addition to an actual
security setup like I described above.
There may still be issues with your login code, how you're remembering who
users are, etc... but that's another email. :)
---Jo
will not update anything if they userID doesn't match and you can show an
appropriate message (there's usually an "affected_rows()" function for your
database that's useful here).
You still need to validate "recordID" to ensure it's an integer before y
are pretty much worthless unless you're on an intranet where
you can control them.
The IP address of a user can change in the middle of a session and multiple
users can have the same IP address (using proxies, for example).
I wouldn't rely on them for anything.
---John Holmes...
--
PHP D
are pretty much worthless unless you're on an intranet where
you can control them.
Thats why I said CAN, since it is unreliable
That's why I said ARE, since I drive a Dodge.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
returned.
Did I finally get this right ?
You tell us; can you get to any other record? Sounds like you're heading in
the right direction, though...
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
en it's just a matter of determining what encryption method
your using and your keys. Hard? Maybe... Impossible? No.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s a waste.
Also, with the above, if I were to change UserID to 5 (assuming that a valid
userID) and recordID to 20 (assuming that's a valid recordID that userID 5
has access to), would I be able to see the record? I shouldn't be...
---John Holmes...
--
PHP Database Mailing List (http:/
From: "CJ Koh" <[EMAIL PROTECTED]>
unsubscribe me
I'm sorry, but you must phrase your request in the form of a question.
---John Holmes...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
at the form comes from the client. Just because you create
the form with "state[]", that doesn't mean I'm going to send it that way. ;)
If it was changed, it could cause an error that might expose file structure
or whatever. So the check is a good thing to ensure nothi
couple lines of
code and still reproduce this?
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ctions. Search your database's manual on how to
use them.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/Mozilla to achieve what you want...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
eally have just a DATE (instead of
DATETIME/TIMESTAMP) column, then it'd be MMDD and -MM-DD
(although any delimiter should work).
$newdate = '20041231';
$query = "UPDATE table SET datecolumn = $newdate WHERE ... ";
$newdate = '2004-12-31';
$query = "UPDATE
(id,...) VALUES ($id,...)";
$query3 = "INSERT INTO (id,...) VALUES ($id,...)";
etc...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ileID, P1,
P2, Pgr, Eml2, Eml3)
VALUES (null, LAST_INSERT_ID(), '$f1b', '$f1c',
'$f1d', '$f1e', '$f1g')";
echo $query;
$result = mysql_query($query);
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|ar
this. Good luck.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
pinfo()... I'm pretty sure the value is in there.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t handling passwords and
authentication securely in your application."
Your application should reset the password to some random value for the
user rather than giving them their original back and force them to
change it the next time they log on.
--
---John Holmes...
Amazon Wishlist: w
er from the old user 3000 is now
related/linked to the new user 3000. How do you even tell there was an
old user 3000? Wouldn't you want to be able to detect that? I'm sure
there are other reasons, too...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
Stéphane Pinel wrote:
I'm looking for a simple way to convert a SQL compliant date (eg
2004-09-06) into a Unix
Epoc seconds (similar to the one returned by function "time()").
strtotime() or the database may have something you can use in your query
(like UNIX_TIMESTAMP() in MySQ
d to show up in the table
cell, then use what you have above.
If you want the literal "word" to show up, then use this:
echo '' . htmlentities($row['textfield']) . '';
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architec
, you'll want to get the error before you run the rollback() function.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
oblem, you need to select the columns with aliases...
$query = "SELECT people_1.first_name as p1_first_name, people.first_name
as p_first_name, ...";
Now you'll have $row['p1_first_name'] and $row['p_first_name'] available.
--
---John Holmes...
Amazon Wishlist: www.a
('Y-m-d',strtotime('09/24/2004'));
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
he US.
Thank you, but WRONG LIST! I see no reference to voting in the output of phpinfo().
Good day!
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y based upon whatever separator you used.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r when installed as a
module, which is the IUSR_ user by default
3. Sessions should work. Run a simple test to find out.
Any issues, let me know.
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html
replyAll
Description: null
--
PHP Database Mailing
l_escape_string
http://us2.php.net/htmlentities
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;t really think it's that great of a resolution.
Use DATE_FORMAT() in your query to format the timestamp, TO_UNIXTIME()
to retrieve a unix timestamp instead of a MySQL timestamp in your query,
or use a couple substr() calls to pull out the pieces of the MySQL
timestamp you need and the
is never going to look like that. You use PHP to format the
result set so it displays how you want it. As you loop through the
returned rows, keep track of what the current first and last name are.
If they change, then output them, otherwise output a blank cell.
--
---John Holmes...
Amazon Wishl
isn't as simple as JSP vs. PHP vs. .NET, etc, many other
things need to be taken into consideration, too. You may just have to
accept that JSP is a better solution in this instance. Or you may weigh
all of the above and decide it'd be stupid to not use PHP.
--
---John Holmes...
egin with, so it can't be empty unless you're
doing something to it.
This smells of a scope issue to me, where you're creating $query_rsCS
and $aWHERE in one function and then trying to access it in another
without declaring it global first.
--
---John Holmes...
Amazon Wishl
ause your error, which
we would have seen if you'd just posted the query...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
riables in the URL/header/cookie data. You can
still write horribly insecure programs with register_globals OFF. You can
easily write very secure programs that function with register_globals ON or
OFF, too.
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html
Matthew Perry wrote:
Is there a way to make an input box save data into a database as users
type? My users keep forgetting to press my "apply changes" buttons.
Educate your users or use some JavaScript auto submit workaround. Not a
PHP issue, though...
--
---John Holmes...
Amazo
ite annoying after a
while, if you can imagine. Yes, I know how to filter them to my Junk
folder, but let's try to stop it at the source instead, eh? ;)
Happy Holidays,
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals
> From: symbulos partners <[EMAIL PROTECTED]>
> Has anybody implemented an object oriented database in PHP yet?
No... PHP would not be a suitable programming language to create a database
in... If you mean an OO abstraction layer to a database, however... then yeah.
---John Holme
;s the easiest way, IMO, because you can include styling along with it.
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ite a while. I don't if it's still being actively
developed or kept up to date or what, though...
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t evaluates to FALSE, then
nothing within the conditional block is executed? Your query is probably
fine, but the code is just never getting to it.
I could tell you to use $_GET['submit'] or $_REQUEST['submit'], but
would you know why or where to use it?
--
---John Holmes.
on']) && $_REQUEST['action'] == 'foo' )
do_something;
Why "lord forbid"? This is how you should do it. I mean, since you do
know what the issue is here, you could use the first method if you're
afraid of isset() or something. I do it the seco
e data).
I know that's a lot of info and we haven't even gotten into why your
database query will probably fail eventually. Wherever you learned PHP
didn't do a very good job or if you're learning it yourself, you need to
spend some more time on the basics before getting this &q
way around that, anyhow), but hopefully optimized
better by MySQL. Perform your own tests, of course.
See the documentation on FOUND_ROWS() at the following URL for more
info: http://dev.mysql.com/doc/mysql/en/Information_functions.html
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o
e question was about how to make
two queries more efficient:
SELECT ... FROM table WHERE ... LIMIT x,y
SELECT COUNT(*) FROM table WHERE ...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Databa
ata units in it
may not be more efficient than connecting to the database and just
retrieving 10 data units at a time...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mai
lines, etc). Sessions rely on cookies and the
cookie must be set in the headers before any output.
any_php_code();
session_start();
any_other_php_code();
?>
...
Also, this is better posted to [email protected] since it has
nothing to do with databases.
--
---John Holmes...
Am
OOzy Pal wrote:
Is it possible to have mysql at an ID as 20050105-1 as
(MMDD-1), -2, etc.
automatically? No. But you can always just use
SELECT CONCAT(date_column,'-',pk_column) AS fixed_id ...
if you _really_ need something like this. Or just join them together in
PHP.
--
---J
Ruprecht Helms wrote:
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...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o
...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
n a record
set?
Unless you're trying to recreate mysql_insert_id(), then the way you
have written is the way to do it. I suppose you could use
mysql_result(), but that'd be pretty inefficient.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect:
ls off. That may be leading to the errors you see later.
The question I have is:
What concerns should I have with PHP sessions when I move from Apache to
IIS?
None if sessions are set up correctly on each machine and you're using
the same version of PHP at the same error reporting level.
-
erly, so I get 34B, 34A, 34C
etc etc.
Is there a simple way for me to make it sort by number first and then by
letter?
Not in your query. Try resorting it using a natural sort in PHP. The A,
B, and C should be in another column, anyhow.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/regi
1 - 100 of 124 matches
Mail list logo