substr();
On Wed, 2003-03-12 at 13:21, Dallas Freeman wrote:
> I dunno what it is called so that is why I am asking, so that I can
> search the web about it.
> What do you call the method of cropping text back, so that there are a
> limited number of characters shown, the rest is cut off.
>
> Th
I would guess that:
$data = mysql_fetch_assoc(mysql_query("select * from some_table limit 1"));
would be faster than:
$pointer = mysql_query("select * from some_table limit 1");
$data = mysql_fetch_assoc($pointer);
but I'm not sure, php may optimize this. Anyone know the answer?
I'm taking ove
ou're better off spending time getting them better.
>
> I highly recommend:
> http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Optimisatio
>n.html#Estimating_performance
>
> Peter
>
> On Thu, 26 Jun 2003, Hugh Bothwell wrote:
> > "Micah Stevens"
MySQL version 4.x has Subquery support.
On Fri July 4 2003 5:54 am, Nadim Attari wrote:
> From MS-SQL Server Manual:
> A subquery is a SELECT query that returns a single value and is nested
> inside a SELECT, INSERT, UPDATE, or DELETE statement, or inside another
> subquery. A subquery can be use
Try using the SQL to select which database.
example, instead of:
select * from table1
use:
select * from database1.table1
if that works, and the php command doesn't that may mean the the mysql client
lib is broken, although, I've been using it with mysql 4 and it seems to work
fine.
-Mic
Agreed, sounds like a pain. to keep two copies. But if you do it to both
copies, and use the same code both places (connect via URL, not 'localhost'
even if you are on the same machine) then it wouldn't be any extra trouble.
The OS will realize that the URL is localhost and make that connection
For each message have a autoincrement message ID, an INT field is sufficient I
would guess.
Also in each message record, have a parentID field as INT, default this to 0,
and if the message is a reply to another message, make the parentID = to the
first message's ID field.
When you're disp
What leads you to believe that it's a query timeout? Is the php script timing
out waiting for the database? Do you get an error saying something about "Max
Execution Time"?
If so, you may want to set that higher in your script. Go check out:
http://si.php.net/manual/en/function.set-time-limit.
) - i.e. a certain
> amount of time before sunset, different for each city and each city is in a
> different dst zone.
>
> Can I do something using setlocale, to change timezones to the city I need,
> and then use date(I)? Or does date(I) always work only for the US? And what
&
ta2.USD FROM
> TestData1 INNER JOIN TestData2 ON
> CONCAT(TestData1.Journal,TestData1.Description)=CONCAT(TestData2.journal,Te
>s tData2.description) WHERE TestData1.Dept<>'D1'";
>
> Thanks,
> John
>
> -Original Message-
> From: Micah Stevens [mai
does exactly what I need.
>
> I'm still confused though about setlocale - what does this do in plain
> English?
>
> Thanks for the info,
>
> -Lisi
>
> At 10:05 AM 8/19/03 -0700, Micah Stevens wrote:
> >Here's the example code I was talking about in the docs, y
Since you didn't include the form, I'm going to have to make a couple of
assumptions:
$nameb is the recipe field.
$pointsb is the points field.
You want to use SQL statement 1 if they select points, 2 if they select
recipies, but those aren't the only possibilities with the form. It sounds to
You have a couple of choices if I remember correctly.. For a table of name
'TBL':
describe TBL;
explain TBL;
show columns from TBL;
-Micah
On Wed September 10 2003 12:08 pm, Peter Beckman wrote:
> So PHP is saying mysql_list_tables is depreciated. I replaced it with
> mysql_query("SHOW TABLE
Now that I see code, I would say just run a 'SELECT * FROM table LIMIT 1' on
your table, and run it through your code. That should give you what you want.
-Micah
On Wed September 10 2003 12:55 pm, Peter Beckman wrote:
> On Wed, 10 Sep 2003, Micah Stevens wrote:
> > descri
Try putting backticks around the table name in the drop table statement.
Is xxx the database name?
-Micah
On Thu September 18 2003 2:09 pm, Jonathan Villa wrote:
> I have several tables I want to delete as well as their reference in
> another database
>
> The query produced is this:
> ===
You may be able to use mysql_fetch_array() and use numerical indexes to
reference the redundant names, but isn't it easier and better to just assign
aliases like you're doing?
It makes for more readable code, that's for sure.
-Micah
On Thu September 18 2003 12:55 pm, Mike Tallroth wrote:
>
run this query:
EXPLAIN SELECT Question.Text_Long, AVG( Response ) FROM `Response` INNER JOIN
Question ON Question.Question_Key = Response.Question_Key WHERE
Question.Question_Key LIKE '2003%' GROUP BY Response.Question_Key ORDER BY
Question.Question_Key ASC
and post the results. This will descri
What line is the parse error on?
On Thu October 9 2003 12:01 pm, NIPP, SCOTT V (SBCSI) wrote:
> I keep receiving a parse error every time I try and view the page I
> am working on. I am developing this very simple application in DreamWeaver
> MX 2004. Here are lines 3-16:
>
> mysql_selec
You're using an alias of 'date' instead of DateOfOrder, so that should be
reflected in the array key.
So:
$Date = $OrderDate["date"];
-Micah
On Sun October 26 2003 4:22 pm, Graeme McLaren wrote:
> Hey everyone, the following query and code works fine but I can't
> understand why I can't echo
First:
Use the SQL distinct command.. it's explained here:
http://www.mysql.com/doc/en/SELECT.html
That will get you unique values.
Then just loop through the result:
while ($d = mysql_fetch_assoc($return)) {
?>
>
http://www.mysql.com/doc/en/Fulltext_Search.html
If you're using something else
This may be a dumb comment, but those variable don't make any sense, you'll
have to replace them with stuff that relates to the query and the database.
-Micah
On Mon October 27 2003 8:34 pm, Shannon Doyle wrote:
> Thanks Micah,
>
>
> while ($d = mysql_fetch_assoc($return)) {
> ?> - I get
>
I was just thinking that a better way to do this is with a public/private key
set. Then it would be secure, but as someone else mentioned, you'd have to
patch the source to make it work.
-Micah
On Friday 25 February 2005 07:29 am, Robby Russell wrote:
> On Thu, 2005-02-24 at 02:37 -0800, Ga
With mysql 4.1 you could union and then subSelect maybe? I'm not
super-familiar with sub selects, so this code won't likely run..
But then, you're runn 4.0x so it won't run anyway. :)
select city_id, count(city_id) as num from
((select city_id from members)
UNION
(select city_id from picture
You can't unhash MD5.. it's one way only. You could encrypt something and
unencrypt it later, but it's not clear what advantage you would get out of
what you're saying.
Perhaps I don't understand, but if you have a separate connection file, why
would you need to pass a password at all?
-Mica
t over the network, but none of
the tools to create it or read it are.
-Micah
On Friday 25 February 2005 08:59 pm, Jason Wong wrote:
> On Saturday 26 February 2005 04:16, Micah Stevens wrote:
> > I was just thinking that a better way to do this is with a
> > public/private key set
>
> The original question was concerning that if someone somehow had access to
> the file which stored the connections details then they would be able to
> use it to connect to the mysql server. Now if someone somehow had access
> to your key then it's game over for you. Unless you password prot
There's not enough information from your question to provide a good answer..
Where are you getting the data from?
Is there more than one record available?
-Micah
On Monday 28 February 2005 11:05 pm, chintan wrote:
> Hi forum
> i have a simple problem
> as im new to php how do i set the outpu
Just reorder your list of selected fields.
SELECT from WHERE
-Micah
On Sunday 06 March 2005 01:10 pm, Wendell Frohwein wrote:
> Hello all,
>
> Have a question for you, don't know how simple this is. I want the
> output that mysql sends to arranged a certain way and I don't know if it
> i
g out, but without a server to try this on, I can't say for sure.
You could however break it down into two queries and use PHP to patch the data
together:
query1: get the make/model
query2: get the years
That type of thing.. Hope that helps.
-Micah
On Sunday 06 March 2005 06:18 pm, Mica
Seperate on another MySQL server, or seperate within the same MySQL server?
On Monday 21 March 2005 11:44 am, NIPP, SCOTT V (SBCSI) wrote:
> I am working on revising a web request app that I have already
> developed. The app basically provides a list of system names with
> checkboxes for a user
Regular expressions are slow. If you need to do some fancy searches, then they
are pretty nice, but if you're just looking for a string in another string,
the stristr() function is faster. (easier to learn too!)
-Micah
On Sunday 03 April 2005 02:48 pm, Josip Dzolonga wrote:
> Matthew Weier O
IRC - #PHP
On Sunday 01 May 2005 06:22 am, Patrick Dunegan wrote:
> Does anyone know where there is a good chat room with PHP developers?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Any sort of abstraction library is going to be slower than directly using the
API.. I don't see how you can get around that.
-Micah
On Thursday 19 May 2005 07:01 am, Oriol wrote:
> hi all,
> I'm proud to install adodb library in my framework. I succesfully got it.
> But, surprise! My scripts
Use an autonumber field in MySQL. It will increment automatically every time
you insert a record, and not repeat numbers. No extra PHP code needed. After
the insert query, you can then issue a mysql_insert_id() function that will
return the autonumber field for the last insert, that way you ca
On Monday 20 June 2005 04:54 pm, Chris Payne wrote:
> For example, I know I need ID, messageid, forumid and messagerootid (Just
> example names) but I'm not sure of the theory of how replies to replies etc
> ... would work in PHP with MySQL? I guess I'm just confused on the whole
> threading busin
You can use LIKE and wildcards, which is faster than fulltext searches, which
will provide you a lot of information you don't need.
Do this:
SELECT * FROM table where column LIKE "%politics%" OR column LIKE "%local%"
to find if the field contains politics or local..
-Micah
On Tuesday 21 J
On Tuesday 21 June 2005 10:35 pm, Dan Fulbright wrote:
> > I have no problem creating a table, using a query from my dbase table
> > "news":
> >
> > SELECT * FROM table where column = VALUE.
> >
> > However, now that most of our articles have more than one column type
> > (i.e. instead of just
If you don't want a group count, but want a total row count instead, there's
no reason to have the group by statement, If you're trying to have a
conglomerate result, where one column is always equal to the total count,
wouldn't it be more efficient to have a seperate query for that?
-Micah
Yes, I don't have the docs here in front of me, but you can set a transaction
for the PDF, create your date/table, and see if it ends up on the next page.
If it does, revert the transaction, issue a ezNewPage() to start a new page
so the date stays with the table, and then go as normal.
Does
Looks like you're telling the browser that the data is base64, and then
decoding the data before you send it.
Try sending the string without the base64_decode() statement. just echo
$string
Or, lose the transfer encoding header, and leave the base64_decode() in..
-Micah
On Tuesday 12 July
I didn't really read your post carefully. On second read it looks like you're
trying inlide embedding? So in other words, you want an HTML page with an are
that is a PDF, as if you used an Tried both ways :(
>
>
> -Original Message-
> From: Micah Stevens [m
Just do all your searching/sorting in PHP.. it would be slower, and if your
dataset is very large (sounds like it might be the case) it would be
impossible.. So that might be out of the question..
A bit of system engineering might find a solution too, consider which fields
you need to search/
#x27;%some';
Make sense? You'll want an SSL connection to the database of course, and
anyone that has any decent access to the server memory would be able to get
the encryption key, but if you're careful it would work.
-Micah
On Tuesday 12 July 2005 2:53 pm, Micah Stevens wrote:
the encrypted data? Assuming SSL connections, secure
> server, etc, would you also encrypt on the DB?
>
> Thanks,
>
> Jeffrey
>
> Micah Stevens wrote:
> >Oh! Also, there's built in mysql functions for encryption, I forgot about
> >that, so you can still search
if (authorized($user)) {
header("Location: http://mydomain.com/$user/index.php";);
}
On Wednesday 13 July 2005 1:13 pm, Vinny Lape wrote:
> I am trying to make a login script that will check a mysql db for usernme,
> password and location.
> If user validates then look at db entry loca
In MySQL you have to reload the database after account creation, is this true
for Oracle/MSSQL as well?
-Micah
On Thursday 21 July 2005 8:53 am, babu wrote:
> Hi all,
>
> I am using php as UI for creating database accounts(oracle,mssql) to
> users.when the users enters his information like nam
What's the file format, if things are delimited, just read the first line out
from the file, after getting it with file() or something, and then use
explode() to break it up into an array based on the delimeter.
Then you can foreach through it.
Assuming it's comma seperated, this would work I
Sounds like it's going awefully slow, I have a table with several million
entires, and it only takes 10-15 seconds to search through.. on a single
processor system with 1 gig of ram too..
What's the query you're using?
-Micah
On Tuesday 26 July 2005 11:24 am, [EMAIL PROTECTED] wrote:
> Ok,
If its a potentially long message you're storing, you can always create an MD5
sum during insertion, compare it to existing MD5 sums, and if they don't
match, there's not duplicates.
Just as an example, if you're inserting message and user data, first see if
there's duplicates:
if (!mysql_num
Do you get error messages? Try this:
";//return num of rows
echo $row["ans.choice"];
?>
On Wednesday 17 August 2005 1:40 am, Chin Yan Yan wrote:
> I had try using the fetch arrays things or the fetch rows but it nv show
> anything out. The ans and info are two different table but in the same
>
I think no one answered it because it doesn't make a whole lot of sense.
Breaking a condition out into a second SQL statement would force the DB to
rescan the table, so it should take longer rather than shorter. There's
nothing suggesting that it's doing an internal self-join or other
time-con
- EXPLAIN SELECT field1, field2,
> andUpToField10
> FROM theTable
> WHERE field2 =1
> ORDER BY field1 ASC
>
> idselect_typetabletypepossible_keyskeykey_len
> refrowsExtra
> 1 SIMPLE theTable ref field2 fie
After reading the documentation in more detail, this should not be server
dependant. The browser is responsible for providing MIME type. So this
depends on the browser, not the server you're running it on.
What I would do is:
$e = explode(".", $_FILES['UploadedFile']['name']); // split by '.'
Or if you need to store all the values, you could normalize the table field
into another table.
-Micah
On Monday 22 August 2005 3:19 pm, Bastien Koert wrote:
> To further append the previous note,
>
> if you want to insert the array, you need to serialize it
> (www.php.net/serialize) to make t
This is tenuous and insecure, you have no control over the $_POST array, only
the submitting page does, I'd do a sanity check, and assign the values needed
into another array before submitting to the database.
This is also primed for a SQL injection attack.
Bad idea.. IMHO..
-Micah
On Mond
Not sure here, as according to my experience, and the MySQL docs, SQL pattern
matching (as you would use with the 'LIKE' syntax) is case-insensitive. From
the docs:
"In MySQL, SQL patterns are case-insensitive by default. Some examples are
shown here. "
http://dev.mysql.com/doc/mysql/en/patte
In fact, by issuing the following query:
SELECT "TEST" LIKE "test";
you can prove this to yourself, if it's case insensitive, it will return true
(1), otherwise false (0).
-Micah
On Wednesday 24 August 2005 1:53 pm, Chris Payne wrote:
> Hi there everyone,
>
>
>
> I have a little problem, I
Hi Chris,
You can use variable variables.. like this:
$num = 2
$varname = "id".$num;
$$varname = "id2 is stored here!";
It's in the docs in the variables section..
HTH,
-Micah
On Sunday 28 August 2005 11:45 pm, Chris Payne wrote:
> Hi there everyone,
>
>
>
> I have the following code:
>
>
>
>
Select * from tablename group by customername order by serialnum DESC;
or
select distinct * from tablename order by serialnum DESC;
On Saturday 03 September 2005 12:34 pm, ziv gabel wrote:
> Hi everyone
> I just need something that I believe is very simple only I can't find an
> answer for it
Does the root user have full permissions? You'll need more than grant if you
are going to run this script.
-Micah
On Tuesday 13 September 2005 3:56 pm, Carson Au wrote:
> Hi Guys, I am a newbie and having a lot of trouble with PHP/MySQL
> lately... We have a number of PHP/MYSQL solutions de
Now that I'm looking at it, it just seems that the password was wrong, or you
no longer have a root user (which you shouldn't if the database has been in
use.. )
You may need to re-create it?
Can you log in like this:
mysql -u root -p
using that same password?
-Micah
On Tuesday 13 Septem
What SQL server are you using?
On Tuesday 13 September 2005 7:08 pm, reclmaples wrote:
> I am trying to write a statement that will basically do this:
>
> SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and END <= CURDATE;
>
> But for some reason I can only use one CURDATE() reference in my sql
> s
DATE();
Better, but I'm not sure if that's just a typo or not.
-Micah
On Tuesday 13 September 2005 7:20 pm, reclmaples wrote:
> I am using mysql Ver 12.22 Distrib 4.0.16
>
> Sorry for not including that.
>
> Thanks
> -Rich
>
> -Original Message-
> Fr
You can't do that in SQL, that would give you a big fat syntax error.
On Tuesday 13 September 2005 7:45 pm, Jordan Miller wrote:
> Rich,
>
> Did you try putting "WHERE" twice?
>
> try:
> SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() and WHERE END <= CURDATE;
>
> Jordan
>
> On Sep 13, 2005, at 9:0
"=" signs, or you may get
> something "=" to CURDATE() twice (not sure how SQL handles this).
>
> Maybe try (taking out one of the "="):
> SELECT * FROM WEEKS WHERE BEGIN >= CURDATE() OR END < CURDATE();
>
> Maybe it's just late over here. H
Hi,
I just noticed I was wrong, the original SQL statement would return rows, but
only if BEGIN = CURDATE(). I stated it would never happen, and that's wrong.
Sorry. :)
-Micah
On Tuesday 13 September 2005 9:42 pm, Micah Stevens wrote:
> Hi Jordan,
>
> Syntactically, there is
ayout ",'r');
> $read = fread($handle, 2048000);
> echo $read;
> pclose($handle);
>
>
> But I can not see anything!!
> Please do help me!
>
> Yui
>
> Micah Stevens wrote:
> > Just read the command docs, and you'll come up with something like
me stuff, but that's part of the job.
Sorry to get up on a soap box, it just seems like you're not trying very hard,
but I understand that you may be intimidated by language differences.
-Micah
On Sunday 18 September 2005 9:36 am, Micah Stevens wrote:
> Well, of course, t
look at:
mysql_escape_string();
On Friday 23 September 2005 2:28 pm, Chris Payne wrote:
> Hi there everyone,
>
> Can any of you see why the below will not insert into my database?
>
> Hann Heritage Homes' Fall Circuit entry. Fabulous ranch floorplan w/walkout
> basement. Stunning great room w/F
Just out of curiosity, your method looks like it should work, what's the mysql
error message?
-Micah
On Friday 23 September 2005 2:28 pm, Chris Payne wrote:
> Hi there everyone,
>
> Can any of you see why the below will not insert into my database?
>
> Hann Heritage Homes' Fall Circuit entry.
That's ridiculous.
On Sunday 25 September 2005 9:28 pm, balwant singh wrote:
> all html tags should be in single quote when used in php like
>
> echo '';
> echo ''; echo "HELLO";
> echo '';
>
>
>
> With Best Wishes
>
> Balwant Singh
>
> INDO ASIAN FUSEGEAR LTD.
> A-39,
that?
-Micah
On Sunday 25 September 2005 9:44 pm, Micah Stevens wrote:
> That's ridiculous.
>
> On Sunday 25 September 2005 9:28 pm, balwant singh wrote:
> > all html tags should be in single quote when used in php like
> >
> > echo '';
> > echo &
> EOB;
> ?>
>
> or.
>
> width="">
>
> -Rasmus
>
> Micah Stevens wrote:
> > I apologize, I was being rude.
> >
> > More specifically, I don't see why you say all html tags should be in
> > single quotes. There's several
It's ugly, but if I was looking for form versus ease of use, I'd wouldn't be
using PHP. :)
-Micah
On Sunday 25 September 2005 11:56 pm, Rasmus Lerdorf wrote:
> Micah Stevens wrote:
> > Rasmus, there's a shortcut for this:
> >
> >
> >
> >
s Lerdorf <[EMAIL PROTECTED]>
> >To: Micah Stevens <[EMAIL PROTECTED]>
> >CC: php-db@lists.php.net
> >Subject: Re: [PHP-DB] HTML Tables in PHP...
> >Date: Sun, 25 Sep 2005 23:56:30 -0700
> >
> >Micah Stevens wrote:
> > > Rasmus, there
One way:
heading("Location: http://www.somesite.com";);
Has to be before any HTML output.
-Micah
On Monday 26 September 2005 12:57 pm, Daryl Booth wrote:
> How can I automatically forward to an external URL using PHP?
>
>
>
> Or is that at all possible?
--
PHP Database Mailing List (http:/
Okay, then you should use an HTML meta tag to forward.. uhh.. (looking it up
since I haven't done this in a while)
Here, try this:
http://www.billstclair.com/html-redirect.html
-Micah
On Monday 26 September 2005 1:10 pm, Daryl Booth wrote:
> I'm new to PHP and so I don't understand what you
#x27;t. I
> tried fopen() but that just sends the output to the variable as text.
>
> -Original Message-
> From: Micah Stevens [mailto:[EMAIL PROTECTED]
> Sent: Montag, 26. September 2005 22:20
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] URL Forwarding in PHP...
&g
www.php.net/preg_match
-Micah
On Wednesday 28 September 2005 3:10 pm, Paul Ohashi wrote:
> Is there a way to test a variable against a regex similar to the way
> Perl uses the binding operator =~ ?
>
> e.g.
> if ($envLine =~ /^* information:/)
>
> Will match:
> Enviro
I don't see a reason to duplicate the class code, just make it keep track of
the $link variable, and each instance of the class can be a seperate
connection.. Then you can do what you want:
$db1 = new dbconn;
$db2 = new dbconn;
$db1->dbconn($host, $user, $pw);
$db2->dbconn($host2, $user2, $pw2)
Well, the class creation I screwed up on, but I think you should get the idea
anyhow.
-Micah
On Thursday 29 September 2005 11:10 am, Micah Stevens wrote:
> I don't see a reason to duplicate the class code, just make it keep track
> of the $link variable, and each instance of the c
No, but it's pretty straightforward, just have each link to another script
along with a get variable that defines which article (assuming they're in a
database or something)
email_article.php?article=$articleID
print_article.php?article=$articleID
email_article.php: (pseudo code)
print_arti
Yes, that sounds correct, when flash requests the page directly, it will
realize it's URLEncoded (or should) and read the variables correctly.
Your browser on the other hand isn't built to display this information, so it
wants you to tell it where to save it.
-Micah
On Tuesday 04 October 2
Sounds like more of a Javascript problem than a PHP one. Maybe some Ajax to
get the updates?
On Sunday 16 October 2005 11:46 pm, [EMAIL PROTECTED] wrote:
> Dear All,
>
> I am a new PHP programmer. I need help from all of you.
>
> I want to make Linked ComboBox between 2 or more ComboBoxs (connec
You're sending the query in a different encoding than the server is expecting
it looks like, or perhaps somehow mixing encodings somehow? Although that
doesn't make sense.
I'd check the default PHP encoding versus what mysql is set up for.
-Micah
On Friday 21 October 2005 1:07 am, Anom wro
Turn display errors on? Then if it's not obvious post the errors here.
-Micah
On Sunday 23 October 2005 10:36 am, Blake Friedman wrote:
> Hi
>
> Apologies, I'm a noob so plz bear with me :).
>
> In attempting to get TorrertFlux, a php bittorrent manager, working I
> came across a significant
Take out the @ symbols so you can get some errors?
On Sunday 30 October 2005 3:03 am, Eoin Hennessy wrote:
> Hello, I have the following very basic sqlite test harness:
>
>$dbconn = @sqlite_open('testdb');
>
> if ($dbconn) {
> @sqlite_query($dbconn, "CREATE TABLE test_table (test_id I
I'm not terrbily familiar with the SQLite stuff, but a quick look in the docs
claim a couple things that may help you here:
1) Error messages for sqlite_open are passed by reference. You should use this
format:
$db = sqlite_open('mysqlitedb', 0666, $sqliteerror)
And then look at the value of
Is it from php or the mssql driver? If it's from the driver, then the library
is installed at least partially correctly. If it's from php, perhaps not.
From there you can narrow it down by checking the connection parameters
outside of php to make sure they're right, is there a mssql client for
mmunication occurred.
>
> This looks like a problem with my PHP configuration but I'm at a loss as
> to what it is.
>
> Robbert
>
> Micah Stevens <[EMAIL PROTECTED]> wrote on 11/01/2005, 11:55:52
>
> PM:
> > Is it from php or the mssql driver? If it's from
There's actually a few issues with php5 connecting that have solutions on this
page:
http://us2.php.net/manual/en/function.mssql-connect.php
You may of read it already though..
On Tuesday 01 November 2005 3:24 pm, Micah Stevens wrote:
> Hmm.. if you're using a function like m
Run it from the command line as the apache user. See if that makes a
difference. I'd guess not though.
Apache's php module doesn't really put any restrictions that I know of on the
scripting.. that's a strange effect..
On Wednesday 02 November 2005 10:54 am, [EMAIL PROTECTED] wrote:
> I origi
functions, I get nothing back on some of the commands (primarily
> traceroute and ping). Others do work (whoami)
>
> Robbert
>
> Micah Stevens <[EMAIL PROTECTED]> wrote on 11/02/2005, 07:58:55
>
> PM:
> > Run it from the command line as the apache user. See if that
system("mysql -u user -p db < /tmp/mydb");
On Saturday 05 November 2005 4:02 pm, Todd Cary wrote:
> My client switched from a dedicated server to a shared server, so I
> cannot use the command line to import a DB that was produced with
> mysqldump. Can I duplicate "mysql -u user -p db < /tmp
Cary wrote:
> Micah -
>
> With the "-p" switch, the user is asked for the password. How does that
> happen with the system command?
>
> Todd
>
> Micah Stevens wrote:
> > system("mysql -u user -p db < /tmp/mydb");
> >
> > On Saturd
mysql_num_rows()
On Tuesday 08 November 2005 5:17 am, Rob C wrote:
> What is the recommended way to find the number of rows found by a SELECT
> query? PDOStatement::rowCount() doesn't work with MySQL and is a bit
> of a hack anyway. Doing a COUNT(*) before the SELECT is very hackish -
> the da
ion.
>
> -Original Message-
> From: Micah Stevens [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 08, 2005 10:51 AM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] [PDO] Number of rows found by Select
>
>
>
> mysql_num_rows()
>
> On Tuesday 08 Novem
formation-functions.html
On Tuesday 08 November 2005 9:13 am, Micah Stevens wrote:
> yeah, it would help if I read the whole post. Sorry.
>
> On Tuesday 08 November 2005 9:06 am, Dwight Altman wrote:
> > I suppose you could use "count( PDOStatement::fetchAll() )", but
E
> $rows_array = $rows->fetch(PDO::FETCH_NUM);
> $rows->closeCursor();
> $count = $rows_array[0];
>
> if (!is_null($limit) && $count > $limit) {
> $count = $limt;
> }
> }
>
> return $s
I'd pull the addslashes() and use mysql_real_escape_string() instead. I'd also
echo the query that's being sent to the database and compare to make sure
it's doing what it should.
-Micah
On Thursday 10 November 2005 8:22 pm, JeRRy wrote:
> Hi,
>
> Well I tried this code but it fails, if I en
101 - 200 of 295 matches
Mail list logo