[PHP] Mysql question(s)
I created a table with FaceMysql that had one field and I could not add data to it .Only when I recreated it with 2 fields and a primary key did it work.Is there any reason for this?Must there always be a primary key in Mysql?I've never known this to be true of relational Db's.Especially if you can't implement a foriegn key.Mike P [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] FaceMysql again
It seems to only allow me to add data if I have more than 1 field.Is this a bug?Phpmyadmin doesnt have this problem. Mike P [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Modulus
I know i'm a liitle slow but why does 2%4 = 2 and not 0 or 1 thanks Mike [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Explain recordset
I'm trying to figure out the way recordsets are handled with php and mysql.After I issue a query to the Db with $result = mysql_query ($query) is the recordset contained in $result or is this just a pointer.I want a persistant recordset on the client computer that can be manipulated without going to the server.Is this possable.fetchrow seems to go to the server each time or am i wrong? Thanks Mike P [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: DOMXML in 4.2.0 problems
I am having similar difficulties with DOMXML in php4.2.0. phpinfo() indicates all is well with the setup... If you get some response, please share! Thanks! Mike "Thalis A. Kalfigopoulos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to get DOMXML to work with PHP4.2.0. I've compiled with --with-dom and phpinfo() says it's there: > DOM/XML enabled > libxml Version 2.4.18 > HTML Support enabled > XPath Support enabled > XPointer Support enabled > > The following program though doesn't seem to work: > > $xmlstring='a valid xml document here'; > $domdoc=xmldoc($xmlstring); > $root=$doc->document_element(); <--- throw error > > I get an error regarding the call to DomDocument->document_element(). Also I'm forced to use xmldoc() instead of the newer domxml_open_mem() because it is also not recognized. What am I missing? > > thanks in advance, > Thalis > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Authentication with register_globals OFF
OK, this is an "authentication with PHP newbie" question... Env: WinNT 4.0, SP6a PHP 4.2.0 Apache 2.0.36 MySQL 4.0.1 Development/sandbox Trying to get accustomed to PHP 4.2.0 and PHP's preference for register_globals off, I have register_globals off. However, when I try to use $PHP_AUTH_USER and $PHP_AUTH_PW, my script fails (attempting to validate username and password credectials against MySQL...no error message and my login failure message does not show up, even after three unsuccessful challenge responses. When I set register_globals on, I am successful in gaining authorization (ie, the header('WWW-Auth' is correct, the script works, the MySQL connection works and the query works). How, then do I define th $PHP_AUTH_USER and $PHP_AUTH_PW variables up front with register_globals off? The docs offer nothing that has led me to a logical answer. TIA!! Mike =>script copied below You are authorized!"; exit; } else{ header('WWW-Authenticate: Basic realm="Authentication Area""'); header('HTTP/1.0 401 Unauthorized'); echo "You need to login with correct credentials."; exit; } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Row colors
I can change the column sof a table with the following code but how do I change the row colors instead.With the columns I have "i" to manipulate but not with rows. while ($row = mysql_fetch_row($result)) {{ echo "\n"; for ($i =1;$i$row[$i]"; Thanks Mike P [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Fetch_row
Can I use Mysql fetch_row to specify which row i want to get? Like---$row[5]=mysql_fetch_row($result) ? Mike P [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Curser
While Im on the subject Is there anything that resembles a recorset curser I can use with mysql? Mike P [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]