[PHP-DB] How to use mysqli with php5.6

2016-06-12 Thread stevens
iated! stevens -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Quick Question: Line Breaks

2004-01-08 Thread Micah Stevens
\n is not converted to a newline unless you use double quotes around the string. See: http://us3.php.net/manual/en/language.types.string.php -Micah On Thu January 08 2004 7:58 pm, Jacob Hackamack wrote: > Hello, > > I have a couple of quick questions. When I execute this code on my php > pa

Re: [PHP-DB] Searching a String mysql

2004-01-11 Thread Micah Stevens
stristr(); http://us2.php.net/stristr -Micah On Sun January 11 2004 8:29 pm, Rick wrote: > Hi all, > Does anyone have a class or function that can be used to search any > given string from a textfield ie: > > $string = london rome paris... > > Thanks in advance! > > > R -- PHP Database M

Re: [PHP-DB] Connectivity PHP4 > mysql

2004-01-15 Thread Micah Stevens
Sounds like you don't have MySQL turned on in PHP. Check phpinfo(); to see if the module is listed in there. -Micah On Thu January 15 2004 2:42 pm, Georg Herland wrote: > Hi > > I've got two servers, one (RH9) with PHP4 and mysql-server and one (RH7.3) > running PHP4 and mysql client only. > >

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
I may be misunderstanding you, but your first statement about pulling from a query string is throwing me. will only display the value of $section on the screen. You will need to build a form to get a value into $section. something.php: Now you can do your query: $selection = mysql_q

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
R BY title $order > ") > > > And since there is no query string when someone lands on the page there > needs to be a default value set: > > > // setting the default variables > > if(!isset($order)){$order="ASC";} > >

Re: [PHP-DB] Selecting last record only

2004-01-21 Thread Micah Stevens
Reverse the order and limit the result to 1. For example, change: SELECT date, item from some_table To: Select date, item from some_table ORDER BY date DESC LIMIT 1 to get the latest dated item. -Micah On Wed January 21 2004 11:49 am, -{ Rene Brehmer }- wrote: > Hi gang > > this is probably

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
Here goes: 1) That should work fine. Be sure and enclose the SQL in double quotes or the variable will not get translated into its value. 2) That's fine too, nothing wrong there. 3) this is wrong, but it looks like you just ommited the SQL statement. Be sure and use the or die statement as i

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
ection > ORDER BY $class $order > > -- gil > > thx for all your patience > > > -Original Message- > > From: Micah Stevens [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, January 21, 2004 3:12 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP-DB] u

Re: [PHP-DB] CREATE TABLE problem

2004-01-21 Thread Micah Stevens
mysql_db_query ($dbname,$query,$link) or die(myself_error()); will help you more than your if/then statement.. change that, and check out the error message. On Wed January 21 2004 2:33 pm, js wrote: > ok im making this page and every single time i try to execute it, it tells > me it was not su

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Micah Stevens
SELECT COUNT(WMS_Area.Area_ID) AS complete_areas FROM WMS_Area, WMS_Bookings WHERE WMS_Area.Area_ID = WMS_Bookings.Area_ID AND MIN(WMS_Bookings.Booking_Status) = 2 GROUP BY WMS_Area.Area_ID Or something like that.. there's probably a better way to do it.. On Fri January 23 2004 1:05 pm, Shau

Re: [PHP-DB] counting a value REVISED pt2

2004-01-30 Thread Micah Stevens
select count(FavNum) as Favorite where FavNum = 2; On Fri January 30 2004 8:19 pm, js wrote: > p.s.- im using PHP with MySQL... if that helps any. thanks > i want to know what i can use to count the number of times a value appears > in a column listing where different values are listed. for exa

Re: [PHP-DB] Functions

2004-02-02 Thread Micah Stevens
Chis, I think this might do what you want: foreach ($_REQUEST as $key => $value) { switch ($key) { case "email": // do email stuff break; case "address": // do address stuff

Re: [PHP-DB] PHP Standalone?

2004-02-05 Thread Micah Stevens
http://us4.php.net/manual/en/features.commandline.php On Thu February 5 2004 3:17 pm, Chris Payne wrote: > Hi there everyone, > > > > I need to produce a system which uses databases but NOT on a webserver, I > heard something about a PHP distro that is being developed which acts like > an execut

Re: [PHP-DB] Associated popup menu (php/mysql)

2004-02-05 Thread Micah Stevens
Javascript is client side programming, PHP is server side and unable to control actions and make decisions on what's happening in the browser except in a 'third person' manner. Simply put, you can't do this with PHP. On Thu February 5 2004 5:21 pm, alb_shop wrote: > Hello all, > > I've bee

Re: [PHP-DB] php/.htacces authentication

2004-02-06 Thread Micah Stevens
.htaccess files will parse before the php script, so you don't have any direct control over them for a particular page load. If you want to use that pop up window for log ins, instead of an .htaccess file, use the php functions: Here's a tutorial: http://www.weberdev.com/ViewArticle.php3?Articl

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
mysql_query does not return a specific value, rather a pointer to a range of values (depending on what the query returns..) so what you're seeing is normal. I think depending on your error settings, PHP will actually return the value as 'POINTER' or something like that to let you know it's not

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
Right.. a resource.. sorry. On Thursday 26 February 2004 12:55 pm, [EMAIL PROTECTED] wrote: > An interesting thought. I tried this: > > echo "Term: $search, Returns: $arrayword, UserIP: $ip"; > $logit = mysql_query("INSERT INTO log SET term='$search', > returns='$arrayword', time=CURTIME(), date

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
t; table, and the line where I echo the $logit var displays a 1. By the > way, I changed the name of the returns field to "found". > > Nick > > Micah Stevens wrote: > >Right.. a resource.. sorry. > > > >On Thursday 26 February 2004 12:55 pm, [EMAIL PROTECTED

Re: [PHP-DB] mysql_num_rows

2004-03-03 Thread Micah Stevens
because you're supplying it with a string not the result of the query.. uncomment your line that says: $result = mysql_query($query, $db); and change the num rows line to: else if (mysql_num_rows($result)==1) Your line that gets the column results will fail for the same reason, give it the r

Re: [PHP-DB] mysql_num_rows

2004-03-03 Thread Micah Stevens
the $db variable isn't referencing a proper connection. As you did not create the db connection in this function, I'm assuming it's a scope problem. Make sure that $db is global, and then add a global statement to the first line in the function for this variable. the $db you're referencing in

Re: [PHP-DB] BLOB

2004-03-14 Thread Micah Stevens
Why would blob be any more secure than anything else? If encryption isn't enough, you're not using the right encryption. :) -Micah On Sunday 14 March 2004 05:18 pm, Ng Hwee Hwee wrote: > hi all.. > > thank you so much for your help! > > i tried out the all the different syntax and the following

Re: [PHP-DB] BLOB

2004-03-16 Thread Micah Stevens
$data = mysql_query("select from "); while ($d = mysql_fetch_array($data)) { echo $d[''].""; } .. or something like that. -Micah On Tuesday 16 March 2004 05:16 pm, Ng Hwee Hwee wrote: > hi, > > i've read the blob document in MySQL manual and i know it is similar to a > text field an

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
That would be the way to do it except that MySQL doesn't support sub-selects until version 4.1, which is in alpha still. -Micah On Tuesday 27 April 2004 04:05 pm, Swan, Nicole wrote: > Have you tried a nested query? I think your problem is that you're really > using information from two diffe

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
ou're trying to do something else that I'm not taking into account. -Micah On Tuesday 27 April 2004 04:14 pm, [EMAIL PROTECTED] wrote: > So you're saying there's no way to do it in this version with a single > statement? > > Thanks, > > John > > -Or

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
re's activity on the site > (without just forwarding all posts to the members - she doesn't want to > turn it into a mailing list per se) they'll start using it. > > The design may be flawed but I don't know any other way to do it. As long > as it serves the purpose

Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Micah Stevens
Do this: echo (" "); PHP doesn't handle array's well in echo statements, so you have to stop the echo, concat the array, and then continue the echo. -Micah On Thursday 29 April 2004 04:46 pm, Craig Hoffman wrote: > I have a script where it uploads a image to directory. I have used > the sc

Re: [PHP-DB] mysql adding

2004-06-04 Thread Micah Stevens
update field = field + 1; On Friday 04 June 2004 01:47 pm, Steven Morgan wrote: > is there anyway to add 1 to an int with 1 mysql query, i know i can pull > the value down with a SELECT then add 1 with php.. then do an UPDATE on > it.. but i didn't know if there was any other way? > thanks > St

Re: [PHP-DB] mysql adding

2004-06-04 Thread Micah Stevens
Wait, sorry, It's late.. update tablename set fieldname = fieldname + 1; That will increment all the rows in table, you can add a 'where' statement to limit the update. update tablename set fieldname = fieldname + 1 where indexfield = someindex; -Micah On Friday 04 June 2004 01:47 pm, Stev

[PHP-DB] query problem..

2004-07-14 Thread Micah Stevens
Hi, I'm getting an unknown colum `num` in where clause error with this query: $options = mysql_query("select options.*, count(option_items.optionID) as `num` from options left join option_li

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
Thank you Torsten , They're backticks, and I get the same error after removing them. Any other ideas? -Micah On Wednesday 14 July 2004 11:48, Torsten Roehr wrote: > "Micah Stevens" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > Hi,

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
It is a column.. ;) And the docs say you can refer to an aliased aggregate column in the where clause: http://dev.mysql.com/doc/mysql/en/SELECT.html I'll take this to the mysql list.. Thanks for your help.. -Micah On Wednesday 14 July 2004 12:01, Torsten Roehr wrote: > "

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
Sorry, I'm wrong.. WHERE cannot refer to aggregate columns.. you must use the HAVING clause. -Micah On Wednesday 14 July 2004 12:07, Micah Stevens wrote: > It is a column.. ;) > > And the docs say you can refer to an aliased aggregate column in the where > clause: > &g

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
' GROUP BY options.optionID HAVING n > 0 -Micah On Wednesday 14 July 2004 12:07, Micah Stevens wrote: > It is a column.. ;) > > And the docs say you can refer to an aliased aggregate column in the where > clause: > > http://dev.mysql.com/doc/mysql/en/SELECT.html > > I'l

Re: [PHP-DB] PHP Max execution time

2004-07-15 Thread Micah Stevens
Just use the set_time_limit function. You can go more than 30 seconds.. Unless you're in safe mode or something weird.. -Micah On Thursday 15 July 2004 02:03 am, Lisi wrote: > I am running a script (called through a browser) that checks entries in a > table one at a time. As the table has gr

Re: [PHP-DB] Re: Joinging two different mySQL result?

2004-08-14 Thread Micah Stevens
select users.usr as email, users.aktiv, users.newsletter, users.emailblock, users.htmlmode, users.none_registered, users_info.* from users, users_info WHERE users.id = users_info.cid That would work. There's no obvious way to join in the 3r

Re: [PHP-DB] Array

2004-08-26 Thread Micah Stevens
Since you provided no value's it's a little tough, but the general for would be: $parts = array( array("PN" => $row1col1, "Desc" => $row1col2, "Qty" => $row1col3), array("PN" => $row2col1, "Desc" => $row2col2, "Qty" => $row2col3) ); Depending on your implimentation, it maybe easier to use s

Re: [PHP-DB] Updating a table when using LEFT JOIN

2004-08-26 Thread Micah Stevens
From the Mysql docs: Starting with MySQL 4.0.4, you can also perform UPDATE operations that cover multiple tables: UPDATE items,month SET items.price=month.price WHERE items.id=month.id; The example shows an inner join using the comma operator, but multiple-table UPDATE statements can use

Re: [PHP-DB] Zip Code Fields

2004-09-08 Thread Micah Stevens
you can store it as an integer, but make sure you use a proper print function to display it later that preserves the 5 digits, such as: echo str_pad($zip, 5, "0", STR_PAD_LEFT); or something like that.. I take it you have no plans to store 10 digit zips? -Micah On Wednesday 08 Septem

Re: [PHP-DB] Please help

2004-09-08 Thread Micah Stevens
Change the code to this: $result = mysql_query($sql . " " . $sql_ext . " limit 0,1") or die(mysql_error()."".$sql." ".$sql_ext . " limit 0,1"); And you'll get the error from mysql and a copy of the actual query. Without that, it's pretty tough to help. -Micah On Wednesday 08 September 200

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
did you make the change to the code I suggested? What does MySQL say the error is? -Micah On Friday 10 September 2004 07:49 am, Stuart Felenstein wrote: > As I said this is a code generator (dbqwiksite). So, > describing the process for creating the code is > different. The $sql is fine, as

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
; = `staTravelReq`.`TravelReqID`) INNER JOIN > `VendorJobDetails` ON (`VendorJobs`.`JobID` = > `VendorJobDetails`.`JobID`) where Like 'ACCFIN' limit > 0,1 > > -- > > --- Micah Stevens <[EMAIL PROTECTED]> wrote: > > did you make

Fwd: Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
. Is that not the > case ? > As a matter of fact, there isn't even a where or like > in my query. Then again myabe that's why I can see > *all* records but not run a search. > > Can you please provide an exmample of the column name > bteween where and like ? > &

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
t;"; > } else { > $itemvalue = qsrequest("search_fd3"); > } > > $cellvalue = " name=\"search_optfd3\"> qscheckselected("^*",$arryopt[3],"selected") . > ">starts with qscheckselected("==",$arryopt[3],"

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
echo $sql." ".$sql_ext; Read the docs: http://www.php.net/echo http://www.php.net/mysql_query On Friday 10 September 2004 01:18 pm, you wrote: > Now that I'm not getting an invalid error message any > longer, how can I get it to echo the sql statement ? > > S

Re: [PHP-DB] Please help

2004-09-14 Thread Micah Stevens
ven a where or like > in my query. Then again myabe that's why I can see > *all* records but not run a search. > > Can you please provide an exmample of the column name > bteween where and like ? > > Thank you. > Stuart > > --- Micah Stevens <[EMAIL PROTEC

Re: [PHP-DB] Help please, back to an error

2004-09-14 Thread Micah Stevens
I'm thinking you should either get a better code generator, or learn more about php.. :) -Micah On Monday 13 September 2004 02:49 pm, Stuart Felenstein wrote: > Thanks to help here I was able to overcome some ivalid > query errors. > > Now I'm back, (probably the same mistake) > > It's coming

Re: [PHP-DB] Two session for the same user, possible?

2004-10-21 Thread Micah Stevens
The Session ID is the same, so it will access the same variables. If you want to force a new session in the new script, do this: http://us2.php.net/manual/en/function.session-regenerate-id.php But this will in effect log the user out of the first session as well. If you want to be able to do b

Re: [PHP-DB] Two session for the same user, possible?

2004-10-21 Thread Micah Stevens
p.s. you can also designate a session ID. If you do this you may be able to have two sessions running concurrently. Never tried it myself, but it should work. -Micah On Thursday 21 October 2004 02:03 pm, Micah Stevens wrote: > The Session ID is the same, so it will access the same variab

Re: [PHP-DB] Two session for the same user, possible?

2004-10-22 Thread Micah Stevens
option 2: user logs into app using a different browser (ie and firefox) > option 3: sessions have a lifetime of one screen (aka no session > persistance). > > I use option 1,2 all the time. One session is "godly" and the second > session is a "luser" session. &g

Re: [PHP-DB] Insert and Update on same page

2004-11-01 Thread Micah Stevens
You didn't mention which database you're working with, so I'll assume mysql. In a word, yes, this is possible, just do it in sequence. pseudo-code: mysql_query("insert blah blah"); $id = mysql_insert_id(); $data = mysql_fetch_assoc(mysql_query("select * from table where id = $id")); $uniqueID =

Re: [PHP-DB] I'm less experienced please be gentle :)

2004-11-18 Thread Micah Stevens
What does it do? Does it give a specific error? I don't see anything wrong with it. If it's not giving an error, perhaps it's returning unexpected results? This change may give you some insight: change: if(@mysql_num_rows(mysql_query($banned)) > 0) { to: $result = mysql_query($banned) or

Re: [PHP-DB] Frames & mySQL

2004-11-18 Thread Micah Stevens
I would use Javascript to update the page content. You can use the DOM to access the content in other frames as long as it's the same base URL I think. So when you output the form after storing the record, output a script that changes the bottom frame. Look up "javascript InnerHTML" in google.

Re: [PHP-DB] & and SID

2004-11-29 Thread Micah Stevens
http://www.php.net/htmlentities On Monday 29 November 2004 01:03 pm, Bobo Wieland wrote: > how can i force the SID variable in urls not to be &SID=, but &SID ? > > > _bobo wieland _ [EMAIL PROTECTED] _ > winamp >> various artists | green velvet - the stalker (i'm losing my mind) -- PHP Database

Re: [PHP-DB] & and sessions

2004-11-29 Thread Micah Stevens
you can use .htaccess files to modify php.ini values for a particular directory. On Monday 29 November 2004 02:16 pm, Bobo Wieland wrote: > Trying to answer a couple of mails here... > > > How > >exactly are you tacking the SID onto the end of these URLs? If it's > >done by php automatically

Re: [PHP-DB] PHP unpredictable with connection to MySql

2004-12-05 Thread Micah Stevens
It's probably stopping due to an error, but no error message is being displayed. Make sure you try and echo mysql_error() to the screen to see if that helps. -Micah On Sunday 05 December 2004 06:53 am, Jamie Marshall wrote: > Can someone please help me? > I am running Apache 2 with mysql 4.1

Re: [PHP-DB] Struggling to install php4 on win 2000 system with apache2

2004-12-07 Thread Micah Stevens
Well for one thing, you're telling it to use the module, and then you're also telling it to use php.exe to parse the files, which is CGI. So that won't work. Pick one or the other. Here's the instructions: http://www.php.net/manual/en/install.windows.apache2.php Pick install as a module, or in

Re: [PHP-DB] No communication between PHP 5.0.3 +MySQL 4.1.9

2005-01-16 Thread Micah Stevens
Have you set the extensions_dir properly? It may not be looking in c:\PHP for the extension.. -Micah On Sunday 16 January 2005 10:37 am, J A Brown wrote: > Will somebody please help me!!! > > I'm trying to set up my web server for PHP and MySQL. I've installed PHP > 5.0.3 and it works fine. >

Re: [PHP-DB] No communication between PHP 5.0.3 +MySQL 4.1.9

2005-01-16 Thread Micah Stevens
ks Micah, but I've already tried that one. > > James > > > "Micah Stevens" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > Have you set the extensions_dir properly? It may not be looking in c:\PHP > > for > > the extensi

Re: [PHP-DB] Security Question

2005-01-16 Thread Micah Stevens
If it submits to a secure server the form data will be encrypted before transmission I believe. At least that's my understanding, and that seems to be how ebay does it for example. Once you log-in, it submits to a secure page. -Micah On Sunday 16 January 2005 06:38 pm, Chris Payne wrote: >

Re: [PHP-DB] Security Question

2005-01-16 Thread Micah Stevens
t; insecure login carries less risk. > > You could always host the login page on a non secure server but post the > form to a secure server. > > Peter > > > -Original Message- > > From: Micah Stevens [mailto:[EMAIL PROTECTED] > > Sent: 17 January 2005 02:46

Re: [PHP-DB] brackets []

2005-01-25 Thread Micah Stevens
On Tuesday 25 January 2005 07:38 am, Craig Hoffman wrote: > Quick question... > I am hoping some could explain this to me. I have an array like this: > > $completed = array($value1, $value2, $value3); > > where the values are sent via a form. > > > when I do print_ r() to see what's in the array

Re: [PHP-DB] storing images in database

2005-01-25 Thread Micah Stevens
Could be lots of things, improper/missing headers is most likely, although it's not clear from your statement if you're displaying the binary data directly in the page or are you calling an image output script in an image tag. (as you should) Show some code and the answer will be clear. -Mic

Re: [PHP-DB] SQL prob

2005-01-30 Thread Micah Stevens
use DISTINCT? On Sunday 30 January 2005 12:51 pm, Bobo Wieland wrote: > Anyone that can help me with this one? I want this SQL-statement to > retrive only distinct values from the original table column named (not > the AS stuff) > > ( > SELECT * , namn_2 AS sec_namn, namn_1 AS one > FROM sortimen

Re: [PHP-DB] Join on single table

2005-02-11 Thread Micah Stevens
Sounds like a self join should work wonders. I didn't test this, but the idea should work: select t1.app_id as a1, t2.app_id as a2, t2.word, t2.score from tablename as t1 left join tablename as t2 on t1.resource_id = t2.resource_id and t1.app_id != t2.app_id group by word order by word voila

Re: [PHP-DB] Join on single table

2005-02-11 Thread Micah Stevens
Weier O'Phinney wrote: > * Micah Stevens <[EMAIL PROTECTED]>: > > Sounds like a self join should work wonders. > > > > I didn't test this, but the idea should work: > > > > > > select t1.app_id as a1, t2.app_id as a2, t2.word, t2.score > &

Re: [PHP-DB] Mail question

2005-02-14 Thread Micah Stevens
I'm replying off-list as this isn't a database question, but check out the pear mail class at: http://pear.php.net It handles SMTP authentication. The standard mail() function does not. HTH -Micah On Monday 14 February 2005 10:12 am, ReClMaples wrote: > I have a quick, probably easy to ans

Re: [PHP-DB] password in md5 to connect to mysql instead of clear password

2005-02-25 Thread Micah Stevens
Nope, the login function uses cleartext. Put your connect function in a seperate file in a secure directory, and include() it to make the connection. That seems to be the way to do it, someone else may have a better idea. -Micah On Thursday 24 February 2005 02:37 am, Gael Lams wrote: > Hi al

[PHP-DB] mySQL 4.0.2-alpha

2002-01-28 Thread Paul Stevens
Hi guys, I'm running mySQL 3.23.43 at the mo' with PHP-GTK 0.5.0. Long and the short of the matter is, anyone running mySQL 4.0.2-alpha in anywhere near a production environment yet, and if so, how is it? My server is a Win2K Server SP2 box...so how steady are those windows binaries??? :-) --

[PHP-DB] MySQL/PHP dropping characters

2002-09-23 Thread Micah Stevens
g, but it's also happening with scripts like PHPMyAdmin, and OSCommerce. So I'm thinking it's a problem with the server configuration. It started soon after I upgraded to PHP 4.2.3 I'm running PHP as a module under Apache on a Redhat 7.2 system. Does anyone have any ideas? I&

Re: AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread Micah Stevens
Nope. Anytime you set an array with no index equal to something, (i.e. $deptcount[]) it will add another element to the end of the array. If you use .=, that means append the data, but since you're not specifying an element, I'm not sure what it would do. Perhaps PHP is smart enough to just ad

Re: [PHP-DB] Dates

2002-09-27 Thread Micah Stevens
May I recommend setting the field type to INT, and just using timestamps? That's what I usually do, then you can manipulate things however you want. Much more convenient than the date style type I think. Looking at how the MySQL docs talk about the DATETIME field, I bet the database is doing j

Re: [PHP-DB] Flush database

2002-09-27 Thread Micah Stevens
Using UNIX timestamps: if (time() - $timestamp > mktime(1,0,0,0,0,0)) { // Difference it greater than one hour. Perform rejection code here } else { // Difference is one hour or less. Perform acception code here. } At 04:35 PM 9/27/2002 -0500, wade wrote: >So how w

Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-23 Thread Micah Stevens
Send me the code around the lines that are giving errors.. Doesn't look like a MySQL error to me. -Micah At 10:18 PM 10/23/2002 +0100, Georgie Casey wrote: Im getting a too many connections error in my PHP pages at http://www.free-ringtones.tv. I presume this is from the MySQL server, and I kno

Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-24 Thread Micah Stevens
Just open one connection. It'll work fine for multiple queries across several include files. I have a project right now that uses about 5 different include files at any one time, and 1 connection works great. Also keeping only one connection alive will speed up the script. -Micah At 09:14 PM

Re: [PHP-DB] Dealing with Unchecked Checkboxes

2002-10-26 Thread Micah Stevens
Unchecked checkboxed do not return a value. They don't return a NULL or empty string or anything. So what you have to do is check to see if the variable is set. If it is set, then it's checked, if it's not set, then it's unchecked. Kinda sucks if your variable names are dynamic, I just erase th

Re: [PHP-DB] File Download - Complete Newbie

2002-10-26 Thread Micah Stevens
if you have the following variables: $path = your download directory path, relative to the webserver address. Like "http://www.yoursite.com/downloads/";. $file = filename $name = Name or description of file. Just create your table, and in the proper cell, put: echo "$name"; The webserver and b

Re: [PHP-DB] mysql_connect problem rh7.3

2002-11-02 Thread Micah Stevens
It doesn't appear you have the PHP MySQL functions installed. When you run phpinfo() you should get something like: mysql MySQL Supportenabled Active Persistent Links1 Active Links1 Client API version3.23.39 MYSQL_MODULE_TYPEbuiltin MYSQL_SOCKET/var/lib/mysql/mysql.sock MYSQL_INCLUDE MYSQL_LIBS

RE: [PHP-DB] Re: Get Last ID Inserted

2002-11-21 Thread Micah Stevens
From the MySQL docs: The most recently generated ID is maintained in the server on a per-connection basis. It will not be changed by another client. It will not even be changed if you update another AUTO_INCREMENT column with a non-magic value (that is, a value that is not NULL and not 0). So

Re: [PHP-DB] Parse Error...

2002-12-02 Thread Micah Stevens
There aren't any closing quotes on your $message variable or semicolon to tell the parser that you're done with the assignment statement. -Micah On Mon, 2002-12-02 at 15:05, Chase wrote: > When trying to execute the following script to send the contents of a table > via "mail()" I am getting

Re: [PHP-DB] Parse Error...

2002-12-02 Thread Micah Stevens
ge .= " "; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: MIC Price File Monitor <[EMAIL PROTECTED]>\r\n"; mail($to, $subject, $message, $headers); ?> On Mon, 2002-12-02 at 1

[PHP-DB] Too many Connections error

2001-06-20 Thread Micah Stevens
l_pconnect, But the documentation says that if a connection already exists, a new one will not be created. So multiple calls shouldn't be a problem, right? Any thoughts on this? THANKS! -Micah Stevens

Re: [PHP-DB] Handling Linefeeds in MySQL/PHP

2001-07-03 Thread Micah Stevens
x27;re processing the text. You can use the same command to do that. Hope this helps, -Micah Stevens Raincross Technologies At 02:29 PM 7/3/2001 -0500, you wrote: >I am creating a content management page that uses a textarea box to enter a >chunk of text which then is sent into the

[PHP-DB] Progress output

2003-01-04 Thread Micah Stevens
I just wrote a script that goes through a database and does a lot of stuff to the data, it takes about 30 seconds to a minute to run through everything, so I thought it would be nice to show a progress indicator of some sort. What I have at this point, is that after every record is processed, I put

Re: [PHP-DB] Progress output

2003-01-04 Thread Micah Stevens
Heh.. I did.. Thanks! -Micah On Sat, 2003-01-04 at 12:05, Jason Wong wrote: > On Sunday 05 January 2003 03:25, Micah Stevens wrote: > > I just wrote a script that goes through a database and does a lot of > > stuff to the data, it takes about 30 seconds to a minute

Re: [PHP-DB] PHP/MySQL

2003-01-04 Thread Micah Stevens
The script is generating a filename based on the id and then copies the file from somewhere to the new location. It's doing just what it's supposed to. IF you don't want it to do it, just use the following instead: // // Insert the photo details into the database /

Re: [PHP-DB] Sore head...

2003-01-07 Thread Micah Stevens
Heh. I used this app in one of my sites, (www.9250x.com) it has some nice features, but whoever programmed it didn't intend for anyone else to make changes, that's for sure. The '%%' in the first snippet is some SQL code, '%' is a wildcard in SQL, so the gist of that section is "If $global_locati

Re: [PHP-DB] Mouseover question...

2003-01-08 Thread Micah Stevens
This is not a mouseover. This builds the links for the popup window that appears when you click on the event in the calendar. Go to the common.php file and find the dLink() function. -Micah On Wed, 2003-01-08 at 09:45, NIPP, SCOTT V (SBCSI) wrote: > OK, this isn't really a DB question, bu

RE: [PHP-DB] Mouseover question...

2003-01-08 Thread Micah Stevens
The links in the calendar are made up of the titles of you events. The displayed length is restricted until you mouse over them, then they expand to show their entire length. This is the code that does that. -Micah On Wed, 2003-01-08 at 10:08, NIPP, SCOTT V (SBCSI) wrote: > You are corre

Re: [PHP-DB] javascript and submitting forms

2003-01-13 Thread Micah Stevens
The window.close(); function is not returning control to the form after closing the window. You must tell it to do so. Use: onClick="return window.close();" This will return the window.close() value to the submit button so that it can do its thing after the window has been closed. Use the same t

Re: [PHP-DB] javascript and submitting forms

2003-01-13 Thread Micah Stevens
( `track_id`, `cat_comments` ) VALUES > ( '0', '$comm' );"; > mysql_query ($query, $link ); > } > ?> > > > > > > > > > > Enter your details here: > > > onClick="return window.close();"

Re: [PHP-DB] Unlimited Categories

2003-01-13 Thread Micah Stevens
Use the parent/child relationship thing: CREATE TABLE Categories ( CategoryID int(11) NOT NULL auto_increment, ParentID int(11) NOT NULL default '0', Category_Name tinytext NOT NULL, PRIMARY KEY (CategoryID) ) TYPE=MyISAM; So at each level you can find the subcategories by: SELECT * FRO

[PHP-DB] Excel ODBC connections

2003-01-17 Thread Micah Stevens
Hi, I have a gig right now that the client wants me to connect to an Excel spreadsheet that contains the data for the website. It's a real low-traffic area, but I do know that these types of connections only can handle a few connections at a time. My question is, does anyone know what the maximu

Re: [PHP-DB] [NB] Mail() question

2003-01-18 Thread Micah Stevens
The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see

Re: [PHP-DB] [NB] Mail() question

2003-01-18 Thread Micah Stevens
S. Wu > [EMAIL PROTECTED] > > "It takes a smart man to be stupid." ~Tony > > > On Saturday, January 18, 2003, at 01:47 PM, Micah Stevens wrote: > > > The mail() function returns true if it functions, i.e. if you have all > > the parameters correct, and tha

Re: [PHP-DB] $HTTP_POST_VARS

2003-01-27 Thread Micah Stevens
No, if you're trying to store an array in the database, use serialize(); http://www.php.net/manual/en/function.serialize.php Something like this: $serialized_data = serialize($HTTP_POST_VARS); $serialized_data = addslashes($serialized_data); mysql_query("INSERT INTO ads (post_vars, createdate)

Re: [PHP-DB] backing up databases

2003-01-27 Thread Micah Stevens
I use a cron script that does something like this: mysqldump -all | zip mysqlbackup.zip ~ You can add a path so that the mysqlbackup.zip file is in your public_html directory so you can download it, or you can use ftpbackup to send it to another server if you want to. -Micah On Mon, 2003-01-2

Re: [PHP-DB] Re: to connect access mdb

2003-02-01 Thread Micah Stevens
looks like PHP to me. COM connections to Access only handle a few connections at a time. The use of a real DB server is reccommended in your situation.i Edwin Boersma wrote: To: [EMAIL PROTECTED] Date: Sat, 01 Feb 2003 18:41:49 +0200 From: Edwin Boersma <[EMAIL PROTECTED]> Subject: [PHP-DB] Re

[PHP-DB] Storing Boolean Values

2003-02-14 Thread Micah Stevens
I've been storing checkbox values in MySQL as Enum's for a while, I was wondering if there's a better way to do things. Is this the most compact way to store a boolean value? -Micah

[PHP-DB] Looking for a Junior PHP/mySQL programmer - Sydney.AU

2003-02-20 Thread Skeeve Stevens
For those interested... please email: [EMAIL PROTECTED] (not the company you will be working for) ___ Skeeve Stevens, RHCE Email: [EMAIL PROTECTED] Website: www.skeeve.org - Telephone: (0414) 753 383 Address: P.O Box 1035, Epping,

  1   2   3   >