Re: [PHP] Mysqli Extension

2013-08-19 Thread Lester Caine
Matijn Woudt wrote: apt-get install php5-mysql Just to elaborate on that ... php5-common and php5-cli does not include a number of modules that need to be loaded separately. Choosing one of the database modules is not the only thing that may need to be added to your list of additional instal

Re: [PHP] Mysqli Extension

2013-08-19 Thread Curtis Maurand
Matijn Woudt wrote: > On Mon, Aug 19, 2013 at 9:40 PM, Ashley Sheridan > wrote: > >> >> >> Matijn Woudt wrote: >> >On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan >> >wrote: >> > >> >> >> >> >> >> Curtis Maurand wrote: >> >> > >> >> > >> >> >Ethan Rosenberg wrote: >> >> >> Dear List - >> >> >

Re: [PHP] Mysqli Extension

2013-08-19 Thread Matijn Woudt
On Mon, Aug 19, 2013 at 9:40 PM, Ashley Sheridan wrote: > > > Matijn Woudt wrote: > >On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan > >wrote: > > > >> > >> > >> Curtis Maurand wrote: > >> > > >> > > >> >Ethan Rosenberg wrote: > >> >> Dear List - > >> >> > >> >> My > >> >mysqli extension seems

Re: [PHP] Mysqli Extension

2013-08-19 Thread Daniel P. Brown
On Aug 19, 2013 2:32 PM, "Ethan Rosenberg" wrote: > > Dear List - > > My mysqli extension seems to have gone away. > (REACTED) Remember: avoid putting passwords - especially for root users - on a public mailing list, which is also permanently archived. > echo "hello2"; > var_dump(function_ex

Re: [PHP] Mysqli Extension

2013-08-19 Thread Ashley Sheridan
Matijn Woudt wrote: >On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan >wrote: > >> >> >> Curtis Maurand wrote: >> > >> > >> >Ethan Rosenberg wrote: >> >> Dear List - >> >> >> >> My >> >mysqli extension seems to have gone away. >> >> >> >> $host = >> >'localhost'; >> >> $user = 'root'; >> >> $pa

Re: [PHP] Mysqli Extension

2013-08-19 Thread Matijn Woudt
On Mon, Aug 19, 2013 at 8:55 PM, Ashley Sheridan wrote: > > > Curtis Maurand wrote: > > > > > >Ethan Rosenberg wrote: > >> Dear List - > >> > >> My > >mysqli extension seems to have gone away. > >> > >> $host = > >'localhost'; > >> $user = 'root'; > >> $password = 'SdR3908'; > >> echo "hello2"; >

Re: [PHP] Mysqli Extension

2013-08-19 Thread Ashley Sheridan
Curtis Maurand wrote: > > >Ethan Rosenberg wrote: >> Dear List - >> >> My >mysqli extension seems to have gone away. >> >> $host = >'localhost'; >> $user = 'root'; >> $password = 'SdR3908'; >> echo "hello2"; >> >var_dump(function_exists('mysqli_connect'));// this returns boo(false) >> $db = 'S

Re: [PHP] Mysqli Extension

2013-08-19 Thread Curtis Maurand
Ethan Rosenberg wrote: > Dear List - > > My mysqli extension seems to have gone away. > > $host = 'localhost'; > $user = 'root'; > $password = 'SdR3908'; > echo "hello2"; > var_dump(function_exists('mysqli_connect'));// this returns boo(false) > $db = 'Store'; > $cxn = mysqli_connect($host,$use

Re: [PHP] Mysqli Extension

2013-08-19 Thread Matijn Woudt
On Mon, Aug 19, 2013 at 8:02 PM, Ethan Rosenberg < erosenb...@hygeiabiomedical.com> wrote: > Dear List - > > My mysqli extension seems to have gone away. > > $host = 'localhost'; > $user = 'root'; > $password = 'SdR3908'; > echo "hello2"; > var_dump(function_exists('**mysqli_connect'));// this ret

Re: [PHP] mysqli & nested queries - maybe I'm rusty...

2013-04-02 Thread Jay Blanchard
Anyone? I have not been able to find a solution online. On 4/1/2013 11:33 AM, Jay Blanchard wrote: I am putting together an application where we are almost exclusively using stored procedures in MySQL because most of the heavy lifting (as it should be) is done in the database. I have exactly

Re: [PHP] MySQLi

2012-12-20 Thread Daniel Brown
On Thu, Dec 20, 2012 at 12:18 PM, Stephen wrote: > I read about the subject in another thread. > > Where does PDO fit? > > That is what I have used for sometime. Am I good? Right as rain. PDO is a preferred abstraction layer in PHP and isn't going anywhere anytime soon. -- Network Infrast

Re: [PHP] mysqli question

2011-11-12 Thread Peet Grobler
On 2011-11-13 1:42 AM, Tommy Pham wrote: >>or db_error ($dbh, $__FILE__, $__LINE__); > > __FILE__ are reserved keywords __LINE__. If you intended to use > variables represent the similar meaning, the suggested approach would Yes, sorry, was a bit quick there - I'm using __FILE__ __LINE_

Re: [PHP] mysqli question

2011-11-12 Thread Tommy Pham
On Sat, Nov 12, 2011 at 6:15 AM, Peet Grobler wrote: > Not sure if this is the correct mailing list to be asking this question > but here goes: > > I've got a prepared statement. > > $stmt = $dbh->prepare ("insert into test values (?, ?)") >        or die ("Error: " . $dbh->error); > $stmt->bind_p

RE: [PHP] mysqli sql question

2011-08-31 Thread Jen Rasmussen
Peet, Could you do something like this instead? This is using named placeholders and a separate line for your statement but I was able to get it to echo the statement in this manner. $sql = "UPDATE table SET field1=:field1, field2=:field2 WHERE id=:id"; $sth = $dbh->prepare($sql)

Re: [PHP] mysqli sql question

2011-08-31 Thread Peet Grobler
On 8/31/2011 1:38 PM, John Black wrote: > Hi Peet, > > not sure if there is a method to echo the sql but you can set your > development MySQL server to log all queries to a log file. > Use the log file with tail and you'll get a live view of all queries the > server attempts to process. > I alre

Re: [PHP] mysqli sql question

2011-08-31 Thread James Yerge
On 08/31/2011 05:23 AM, Peet Grobler wrote: > Is it possible to get the actual sql that is being used to query or > update the database? > > E.g > $sth = $dbh->prepare ("update table set field=?, field2=? where id=?); > mysqli_bind_param ($sth, 'ssi', 'text1', 'text2', 10); > $sth->execute(); > > S

Re: [PHP] mysqli sql question

2011-08-31 Thread John Black
On 31.08.2011 11:23, Peet Grobler wrote: Is it possible to get the actual sql that is being used to query or update the database?> E.g $sth = $dbh->prepare ("update table set field=?, field2=? where id=?); mysqli_bind_param ($sth, 'ssi', 'text1', 'text2', 10); $sth->execute(); Something like $st

Re: [PHP] mysqli procedural calls and manual entries ?

2010-03-15 Thread Daniel Brown
On Fri, Mar 12, 2010 at 06:48, Daniel Egeberg wrote: > > Hi Per, > > The manual already supports that. If you install the sqlite extension > on your webserver, it should work. Dan; The question wasn't whether or not it supports that kind of lookup, but rather why it's not working. We've

Re: [PHP] mysqli procedural calls and manual entries ?

2010-03-15 Thread Daniel Egeberg
On Fri, Mar 12, 2010 at 08:49, Per Jessen wrote: > I run a local mirror of the PHP manual, and I most often go straight to > the "Search for" box to look up the format of a function.  With the > mysqli functions, I've found than many of them simply > aren't "available" that way.  E.g. mysqli_conne

Re: [PHP] mysqli procedural calls and manual entries ?

2010-03-12 Thread Per Jessen
Daniel Brown wrote: > On Fri, Mar 12, 2010 at 02:49, Per Jessen wrote: >> I run a local mirror of the PHP manual, and I most often go straight >> to the "Search for" box to look up the format of a function.  With >> the mysqli functions, I've found than many of them simply >> aren't "available" t

Re: [PHP] mysqli procedural calls and manual entries ?

2010-03-12 Thread Daniel Brown
On Fri, Mar 12, 2010 at 02:49, Per Jessen wrote: > I run a local mirror of the PHP manual, and I most often go straight to > the "Search for" box to look up the format of a function.  With the > mysqli functions, I've found than many of them simply > aren't "available" that way.  E.g. mysqli_conne

Re: [PHP] mysqli, prepare and fetch_row

2008-10-23 Thread Marten Lehmann
Hi, Kyle Terry wrote: Why don't you want to bind the results? thats poor programming style and bad performance (dozends of bind calls). Since there is a method fetch_row(), then why shouldn't I use it? It is a bit strange that I cannot find any example for its use besides in conjunction wit

Re: [PHP] mysqli, prepare and fetch_row

2008-10-22 Thread Marten Lehmann
Hi, You prepare the statement, execute it then use ->fetch() to get the data. but the documentation says, that ->fetch() is only to fetch data to variables that have been bound with bind_result() before. But I want to use fetch_row() instead. Regards Marten -- PHP General Mailing List (ht

Re: [PHP] mysqli, prepare and fetch_row

2008-10-22 Thread Kyle Terry
You prepare the statement, execute it then use ->fetch() to get the data. On Oct 22, 2008, at 1:36 PM, Marten Lehmann <[EMAIL PROTECTED]> wrote: Hello, I have a small piece of code where I'm trying to use mysqli with a prepare-statement. I don't want to bind variables for the fetch, inst

Re: [PHP] Mysqli issue

2008-09-11 Thread Chris
Jason Pruim wrote: No political undertones in this one I promise! :) Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli Here is the relevant code: $stmt = mysqli_stmt_init($link); mysqli_stmt_prepare($stmt, "UPDATE purl.schreur (

Re: [PHP] Mysqli issue

2008-09-11 Thread Andrew Ballard
On Thu, Sep 11, 2008 at 12:08 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Sep 11, 2008, at 11:23 AM, Stut wrote: > >> On 11 Sep 2008, at 16:15, Jason Pruim wrote: >>> >>> Attempting to setup a prepared statement in php that will update a record >>> in a mysql database using mysqli >>> >>> Her

Re: [PHP] Mysqli issue

2008-09-11 Thread Stut
On 11 Sep 2008, at 17:08, Jason Pruim wrote: On Sep 11, 2008, at 11:23 AM, Stut wrote: On 11 Sep 2008, at 16:15, Jason Pruim wrote: Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli Here is the relevant code: $stmt = mysqli_s

Re: [PHP] Mysqli issue

2008-09-11 Thread Jason Pruim
On Sep 11, 2008, at 11:23 AM, Stut wrote: On 11 Sep 2008, at 16:15, Jason Pruim wrote: Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli Here is the relevant code: $stmt = mysqli_stmt_init($link); mysqli_stmt_prepare($stmt, "

Re: [PHP] Mysqli issue

2008-09-11 Thread Wolf
> >> Attempting to setup a prepared statement in php that will update a > >> record in a mysql database using mysqli > >> > >> Here is the relevant code: > >>$stmt = mysqli_stmt_init($link); > >>mysqli_stmt_prepare($stmt, "UPDATE purl.schreur (FName, LName, > >> email, > >> phone, record

Re: [PHP] Mysqli issue

2008-09-11 Thread Stut
On 11 Sep 2008, at 16:29, Wolf wrote: Jason Pruim <[EMAIL PROTECTED]> wrote: No political undertones in this one I promise! :) Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli Here is the relevant code: $stmt = mysqli_stmt_

Re: [PHP] Mysqli issue

2008-09-11 Thread Jason Pruim
On Sep 11, 2008, at 11:29 AM, Wolf wrote: Jason Pruim <[EMAIL PROTECTED]> wrote: No political undertones in this one I promise! :) Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli Here is the relevant code: $stmt = mysqli

Re: [PHP] Mysqli issue

2008-09-11 Thread Wolf
Jason Pruim <[EMAIL PROTECTED]> wrote: > No political undertones in this one I promise! :) > > Attempting to setup a prepared statement in php that will update a > record in a mysql database using mysqli > > Here is the relevant code: > $stmt = mysqli_stmt_init($link); > mysql

Re: [PHP] Mysqli issue

2008-09-11 Thread Stut
On 11 Sep 2008, at 16:15, Jason Pruim wrote: Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli Here is the relevant code: $stmt = mysqli_stmt_init($link); mysqli_stmt_prepare($stmt, "UPDATE purl.schreur (FName, LName, email, p

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-12 Thread Robert Cummings
On Wed, 2007-12-12 at 10:47 +0100, Per Jessen wrote: > Robert Cummings wrote: > > >> I can't remember what sort of environment the OP was in, but if any > >> sort of organised testing is done, the use of two different APIs will > >> just about double the test-effort. Which is why I still think th

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-12 Thread Nathan Nobbe
On Dec 12, 2007 4:47 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Robert Cummings wrote: > > >> I can't remember what sort of environment the OP was in, but if any > >> sort of organised testing is done, the use of two different APIs will > >> just about double the test-effort. Which is why I stil

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-12 Thread Per Jessen
Robert Cummings wrote: >> I can't remember what sort of environment the OP was in, but if any >> sort of organised testing is done, the use of two different APIs will >> just about double the test-effort. Which is why I still think the >> best option is to mandate _one_ of the APIs and choose you

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Larry Garfield
On Tuesday 11 December 2007, Per Jessen wrote: > Stut wrote: > > I couldn't care less what your domain name is, you're still advocating > > a poor choice IMHO. > > I have been trying hard not to join this thread, but ... apart from the > principle, what's _really_ so poor about it? Having to write

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Nathan Nobbe
On Dec 11, 2007 4:11 PM, Per Jessen <[EMAIL PROTECTED]> wrote: > I can't remember what sort of environment the OP was in, but if any sort > of organised testing is done, the use of two different APIs will just > about double the test-effort. Which is why I still think the best > option is to mand

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Robert Cummings
On Tue, 2007-12-11 at 22:11 +0100, Per Jessen wrote: > Robert Cummings wrote: > > > On Tue, 2007-12-11 at 18:14 +0100, Per Jessen wrote: > >> I have been trying hard not to join this thread, but ... apart from > >> the principle, what's _really_ so poor about it? Having to write > >> application

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Per Jessen
Robert Cummings wrote: > On Tue, 2007-12-11 at 18:14 +0100, Per Jessen wrote: >> I have been trying hard not to join this thread, but ... apart from >> the principle, what's _really_ so poor about it? Having to write >> application code that needs to work with two different APIs is poor >> enough

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Robert Cummings
On Tue, 2007-12-11 at 18:14 +0100, Per Jessen wrote: > Stut wrote: > > > I couldn't care less what your domain name is, you're still advocating > > a poor choice IMHO. > > > > I have been trying hard not to join this thread, but ... apart from the > principle, what's _really_ so poor about it?

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Robert Cummings
On Tue, 2007-12-11 at 17:01 +, Richard Heyes wrote: > >> Real life is rarely optimal. > > > > That's not a valid excuse for taking the sloppy pig route to > > development. Sloppy pig's give conscientious developers a bad name. And > > when they use PHP to create their slop, they give PHP a bad

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Richard Heyes
I don't see a reason to compromise. It would take no longer to call extension_loaded on each page request than it will to put the variable in the session. You're right in saying that there's a balance to be struck, but in this particular case I personally see a right way and a wrong way and no

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Per Jessen
Stut wrote: > I couldn't care less what your domain name is, you're still advocating > a poor choice IMHO. > I have been trying hard not to join this thread, but ... apart from the principle, what's _really_ so poor about it? Having to write application code that needs to work with two differen

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Stut
Richard Heyes wrote: Real life is rarely optimal. That's not a valid excuse for taking the sloppy pig route to development. Sloppy pig's give conscientious developers a bad name. And when they use PHP to create their slop, they give PHP a bad name. Well I err towards actually doing something

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Richard Heyes
Real life is rarely optimal. That's not a valid excuse for taking the sloppy pig route to development. Sloppy pig's give conscientious developers a bad name. And when they use PHP to create their slop, they give PHP a bad name. Well I err towards actually doing something useful. Businesses can

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Robert Cummings
On Tue, 2007-12-11 at 16:31 +, Richard Heyes wrote: > > Sre, sessions are for whatever you choose to put in them. That's > > like saying bodies are for whatever a crazed murderer chooses to put in > > them... > > No it's not. Yes it is. Neither is a good argument. > > the statement

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Richard Heyes
Sre, sessions are for whatever you choose to put in them. That's like saying bodies are for whatever a crazed murderer chooses to put in them... No it's not. > the statement is true, but it's not optimal. Real life is rarely optimal. -- Richard Heyes http://www.websupportsolutions.co.

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Richard Heyes
So? It's there - use it. So are cookies, would you stuff this into a cookie? No, because that's not what cookies are there for. Not because "it's not what cookies are for" - but because sessions are a more efficient and easier to use storage medium. You could potentially be pointlessly dup

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Robert Cummings
On Tue, 2007-12-11 at 15:25 +, Stut wrote: > Richard Heyes wrote: > >> Because it's not user data, it's server data. > > > > So? It's there - use it. > > So are cookies, would you stuff this into a cookie? No, because that's > not what cookies are there for. > > "Because it's there" is neve

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Stut
Richard Heyes wrote: Because it's not user data, it's server data. So? It's there - use it. So are cookies, would you stuff this into a cookie? No, because that's not what cookies are there for. "Because it's there" is never a good reason to do something. That's entirely the wrong place

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Richard Heyes
Because it's not user data, it's server data. So? It's there - use it. That's entirely the wrong place to store something like which database API is installed. Not really. You could even wrap a function called (for example) Feature() around it. Yeah, really. Sessions are for user data. I

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Per Jessen
Stut wrote: > However, I'd expect a stat on that > file will be more expensive than calling extension_loaded. Difficult to say, but a stat() is cheap, especially if the inode is cached already. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Jochem Maas
Stut wrote: > Richard Heyes wrote: >>> You use a session variable for that? >> >> Why not? > > Because it's not user data, it's server data. > >>> That's entirely the wrong place to >>> store something like which database API is installed. >> >> Not really. You could even wrap a function called (

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Stut
Richard Heyes wrote: You use a session variable for that? Why not? Because it's not user data, it's server data. That's entirely the wrong place to store something like which database API is installed. Not really. You could even wrap a function called (for example) Feature() around it.

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-11 Thread Richard Heyes
You use a session variable for that? Why not? That's entirely the wrong place to store something like which database API is installed. Not really. You could even wrap a function called (for example) Feature() around it. > It should a class variable or global configuration variable. Heck,

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-10 Thread Robert Cummings
On Tue, 2007-12-11 at 13:02 +0900, Dave M G wrote: > Zoltan, Per, Richard, Chris, Daniel, Larry, > > Thank you for responding. > > I have created a method in the class that handles my database > connections that will first test on extension_loaded(mysqli) before > connecting to the database. >

Re: [PHP] Mysqli support - test or complain? [SOLVED]

2007-12-10 Thread Dave M G
Zoltan, Per, Richard, Chris, Daniel, Larry, Thank you for responding. I have created a method in the class that handles my database connections that will first test on extension_loaded(mysqli) before connecting to the database. Then I store the result in a session variable for reference, so

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Larry Garfield
On Monday 10 December 2007, Dave M G wrote: > One is based on the assumption that mysqli is as likely not to be > available as it is to be installed. In this case I should write my > scripts to test whether it exists and then use either mysqli or straight > mysql commands as appropriate. If this i

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Chris
Per Jessen wrote: Richard Heyes wrote: another. This is one of the reasons abstraction layers exist. Which brings us to alternative #3 - odbc. That's probably less likely to be available than mysqli. If you're targetting php5 then you could use pdo::mysql as well (and there's even the l

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Daniel Brown
On Dec 10, 2007 3:16 AM, Dave M G <[EMAIL PROTECTED]> wrote: > Which assumption should I be proceeding with? Rather than assume (because we all know what happens then), why not build for both scenarios? Here's an example of one way '.mysql_error()."\n"); } else { $db_conn = mysql

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Per Jessen
Richard Heyes wrote: > another. This is one of the reasons abstraction layers exist. Which brings us to alternative #3 - odbc. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Richard Heyes
How exactly do I test for the presence of mysqli from within a script? IIRC there's a function called extension_loaded(). Or something similar. Or are you saying I have two different versions of my script? Not at all. Taking PEAR::DB for example, you could test for the existence of mysqli,

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Per Jessen
Dave M G wrote: > Richard said: > > Alter your program to support both - use mysqi if it's avilable, >> mysql if it's not. > > How exactly do I test for the presence of mysqli from within a script? > Or are you saying I have two different versions of my script? I think you can test for the avai

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Zoltán Németh
2007. 12. 10, hétfő keltezéssel 21.58-kor Dave M G ezt írta: > Richard, Per, Andres, > > Thank you for responding. > > If it were entirely my web site to dictate what to do with, I would just > switch for a server that has mysqli available to me. > > However, in this one case, the web site is o

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Dave M G
Richard, Per, Andres, Thank you for responding. If it were entirely my web site to dictate what to do with, I would just switch for a server that has mysqli available to me. However, in this one case, the web site is owned by a small, not very profitable group that has reasons to stay with t

RE: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Andrés Robinet
> -Original Message- > From: Per Jessen [mailto:[EMAIL PROTECTED] > > Dave M G wrote: > > > One is based on the assumption that mysqli is as likely not to be > > available as it is to be installed. In this case I should write my > > scripts to test whether it exists and then use either my

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Richard Heyes
One is based on the assumption that mysqli is as likely not to be available as it is to be installed. In this case I should write my scripts to test whether it exists and then use either mysqli or straight mysql commands as appropriate. If this is the way to go, what do I do to test for the exi

Re: [PHP] Mysqli support - test or complain?

2007-12-10 Thread Per Jessen
Dave M G wrote: > One is based on the assumption that mysqli is as likely not to be > available as it is to be installed. In this case I should write my > scripts to test whether it exists and then use either mysqli or > straight mysql commands as appropriate. If this is the way to go, what > do I

Re: [PHP] Mysqli insert / OO Design Problem - Call to a member function bind_param() on a non-object in...

2007-05-17 Thread Robin Vickery
On 16/05/07, Lee PHP <[EMAIL PROTECTED]> wrote: /** Insert record. */ public function insert() { $sql = "INSERT INTO table (" . "field_1, " . "field_2, " . "field_3) " . "?, " . "?, " .

Re: [PHP] Mysqli insert / OO Design Problem - Call to a member function bind_param() on a non-object in...

2007-05-16 Thread Chris
Lee PHP wrote: Hi there, I'm new to OO-PHP and have encountered a problem that I just can't figure out. I have a class called DBAccess that extends mysqli. In a nutshell, it looks like this: If I execute the following code: $conn = DBAccess::getInstance(); Does that give you an object? C

Re: [PHP] mysqli bind_param and store_result don't work well together

2006-01-13 Thread Curt Zirzow
On Sat, Jan 14, 2006 at 03:18:55AM +0530, anirudh dutt wrote: > On 1/5/06, Curt Zirzow <[EMAIL PROTECTED]> wrote: > > On Wed, Jan 04, 2006 at 12:31:02AM +0530, anirudh dutt wrote: > > > hi > > > the subject is pretty much what the problem is. > > > > > > if i use > > > $st1 = $sql->stmt_init(); //

Re: [PHP] mysqli bind_param and store_result don't work well together

2006-01-13 Thread anirudh dutt
On 1/5/06, Curt Zirzow <[EMAIL PROTECTED]> wrote: > On Wed, Jan 04, 2006 at 12:31:02AM +0530, anirudh dutt wrote: > > hi > > the subject is pretty much what the problem is. > > > > if i use > > $st1 = $sql->stmt_init(); // $sql is a mysqli obj/conn > > $st1->prepare("select `num` from `activity` wh

Re: [PHP] mysqli bind_param and store_result don't work well together

2006-01-04 Thread Curt Zirzow
On Wed, Jan 04, 2006 at 12:31:02AM +0530, anirudh dutt wrote: > hi > the subject is pretty much what the problem is. > > if i use > $st1 = $sql->stmt_init(); // $sql is a mysqli obj/conn > $st1->prepare("select `num` from `activity` where `id` = ?"); > $st1->bind_param('s', $myid); > $myid = '3f6d

Re: [PHP] mysqli class not found

2005-12-29 Thread John Nichel
PHP Superman wrote: Hold on, I heard that you can't run the mysql and mysqli php extensions , try removing the mysql extension if my other advice doesen't work Please reply to the list. You can compile php with both. From the manual : http://us2.php.net/mysqli If you would like to instal

Re: [PHP] mysqli class not found

2005-12-29 Thread John Nichel
PHP Superman wrote:* What OS are you using? I think that you entered the wrong filename. for windows i use php_mysqli.dll . Somewhere in php.ini there is a list of extensions you can use, uncomment the php_mysqli.dll , copy php_mysqli.dll to the php install directory and change the php.ini extens

Re: [PHP] mysqli class not found

2005-12-29 Thread PHP Superman
/www/cgi-bin/db_connect.php on line 4, > > I added extenstion=mysqli.so to my php.ini > > Erik > > - Original Message - > From: "PHP Superman" <[EMAIL PROTECTED]> > To: "Erik Saline" <[EMAIL PROTECTED]> > Cc: > Sent: Wednesday, Dec

Re: [PHP] mysqli class not found

2005-12-29 Thread Erik Saline
erman" <[EMAIL PROTECTED]> To: "Erik Saline" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, December 28, 2005 6:56 PM Subject: Re: [PHP] mysqli class not found you are not missing anything, you are actually adding to much. Using "new" is for making objects, if you t

Re: [PHP] mysqli class not found

2005-12-28 Thread PHP Superman
you are not missing anything, you are actually adding to much. Using "new" is for making objects, if you take away the "new" in the $result variable declaration it should work fine. On 12/28/05, Erik Saline <[EMAIL PROTECTED]> wrote: > > > - Original Message - > From: Erik Saline > To: php-

Re: [PHP] mysqli module in php 4

2005-12-28 Thread Paul Waring
On 12/28/05, Bagus Nugroho <[EMAIL PROTECTED]> wrote: > Is mysqli module enable by default on php 4 as mysql module. No, because it's a PHP5 module (if you look at the documentation for it, all the php.ini settings for it have only been available since 5.0.0). > If not enable by default, where I

Re: [PHP] mysqli unclonable object

2005-11-25 Thread Matt Monaco
In outlook express by default the headers are displayed as some icons and then subject, from, sent, size. For some people From is displayed in double quotes, and others not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysqli unclonable object

2005-11-25 Thread Curt Zirzow
On Wed, Nov 23, 2005 at 11:43:56PM -0500, Matt Monaco wrote: > I get string(1) "", should that be taken just the same as 0? In addition > phpinfo() indicates php 5.0.4 - does the upgrade to .5 involve remove .4 > first? I'm not sure how you are getting 'string(1) ""' with php5.0.x you should h

Re: [PHP] mysqli unclonable object

2005-11-23 Thread Matt Monaco
I get string(1) "", should that be taken just the same as 0? In addition phpinfo() indicates php 5.0.4 - does the upgrade to .5 involve remove .4 first? btw, as I'm new to the mailing list thing, why do some names appear in quotes and others do not? Thanks, Matt "Curt Zirzow" <[EMAIL PROTE

Re: [PHP] mysqli unclonable object

2005-11-23 Thread Curt Zirzow
On Wed, Nov 23, 2005 at 06:48:50PM -0500, Matt Monaco wrote: > Thanks for your attention Curt, but unfortunatly that is not the issue. > Compatibility mode is not on. What does this say just before you do $link = new ...: var_dump(ini_get('zend.ze1_compatibility_mode')); If it says string(1) "

Re: [PHP] mysqli unclonable object

2005-11-23 Thread Matt Monaco
Thanks for your attention Curt, but unfortunatly that is not the issue. Compatibility mode is not on. For documentation's sake, I think the problem is that there are other links in the code using the same credentials. When you declare a link resource to a database, PHP first searches to see if th

Re: [PHP] mysqli unclonable object

2005-11-23 Thread Curt Zirzow
On Wed, Nov 23, 2005 at 01:13:22AM -0500, Matt Monaco wrote: > On a Fedora 4 machine running MySQL 4.1 I am having trouble declaring an > instance of a mysqli extension. > > class Data extends mysqli { > > > $link = new Data("localhost", "user", "password", "db"); > > This invokes the

Re: [PHP] MySQLI, Class not found

2005-06-21 Thread Esteamedpw
Wow, I feel really stupid... // create short variable names $searchtype=$_POST['searchtype']; $searchtype=$_POST['searchterm']; the third line should be $searchterm=$_POST['searchterm'] wow lol... I'd like to hope this wasn't the error all along - but atlea

Re: [PHP] MySQLI, Class not found

2005-06-21 Thread Esteamedpw
In a message dated 6/21/2005 2:55:08 P.M. Central Standard Time, [EMAIL PROTECTED] writes: error_reporting(E_ALL); Well, with E_ALL on i get this error: === Notice: Undefined variable: searchterm in c:\wamp\www\books\results.php on line 18 You have not entered search de

Re: [PHP] MySQLI, Class not found

2005-06-21 Thread Catalin Trifu
Hi, One thing i see is the use of num_rows on mysqli_result class, but num_rows is member or mysqli class and not mysqli_result. Perhaps this call to num_rows corrupts the rest. Other than that everything seems fine. Perhaps you should consider linux :), much better choice

Re: [PHP] MySQLI, Class not found

2005-06-21 Thread Esteamedpw
when i try it this way: query($query); $num_results = $result->num_rows; echo 'Number of books found: '.$num_results.''; for ($i=0; $i <$num_results; $i++) { $row = $result->fetch_assoc(); echo ''.($i+1).'. Title: '; echo htmlspecialchars(stripslashes($row['title'])); echo 'Author: '; e

Re: [PHP] MySQLI, Class not found

2005-06-21 Thread Catalin Trifu
Could you make a var_export($result); before calling free() ? Normally the extension should work fine with MySQL 4.1.12. Does the phpinfo() say against which MySQL version it was compiled. I use mysqli on linux and have no problems with it. php5.1.0b1, apache 2.0.54, mysql 4.1.1

Re: [PHP] MySQLI, Class not found

2005-06-21 Thread Esteamedpw
Well, I figured out that problem (I suppose) by upgrading to MySQL 5.0 and the error doesn't come up anymore... but now I get this error: Fatal error: Call to a member function free() on a non-object in C:\xampp\htdocs\results.php on line 60 Again, here's the code: =

Re: [PHP] mysqli -> mysql

2004-10-06 Thread Marek Kilimajer
http://bugs.php.net/bug.php?id=29860 Whitehawk Stormchaser wrote: Hi! I have a trouble with building MySQL and MySQLi support together with PHP... Basically my config says: ../configure --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config (and other switches) but I get this: /usr/lib/mysql/li

Re: [PHP] [ mysqli ] how can i define the charset for mysqli

2004-07-18 Thread Jason Wong
On Monday 19 July 2004 07:44, Unreal HSHH wrote: > i want to use utf8 charset to connect the mysql4.1.x,and use the mysql > charset for tables,columns. > > but i cant found the charset setting or function in php. > > how can i do it? Reposting this at 10 minute intervals will very likely annoy peo

Re: [PHP] mysqli prepapred SELECT statement

2004-07-16 Thread Curt Zirzow
* Thus wrote Support: > Anyone working with php5/mysql 4.1 yet with the new ext/mysqli? > > This has me stumped: > > $stmt = $mysqli->prepare('SELECT * FROM users WHERE userid=?'); > > $stmt->bind_param('i', $userID); > > $stmt->execute(); > > ...now how to get the results??? I can't use bind_