I had to go look up "RTFM" at the link you put in your sig. I read the manual actually before I even tested the function, but I was idiot enough not to see the 32-bit thing. Thanks for pointing it out. Celia
I don't suppose you have any idea how to keep a database protected from the general internet or communicate with it using VPN? Any material I can read to get me started perhaps? I don't even know what VPN is! Celia
I suspect so because I just ran this program and it didn't find any out of range values.
<?
$e = 0;
for($i=0; $i < 1000000; $i++) {
$str = rand(1,999).'.'.rand(1,999).'.'.rand(1,999).'.'.rand(1,999);
if (crc32($str) > 2147483647 || crc32($str) < -2147483648) {
echo "Out of range for...
No matter what value I give for crc32() I end up with an integer that could be stored in a signed int column in a mysql database. Is there a way to find out if this would always be the case? Celia
Is it possible to connect to mysql on another computer, in a different state? Is this secure? (could somebody intercept my username/password and gain access to my database?) Is it fast? Running a few small select statements and about 2 update/inserts? Most webhosts run php in safe mode, if it...
I solved it, missing a single closing curly bracket } on an if. The error was about 900 lines above where php had the parse error:) I solved it by copying and pasting units of my program into a new php file until the error re occurred. Then, having isolated the error to a block of code (about...
"parse error, unexpected $" but there's no dollar sign there! (it's the end of the page)
Now I've had this error before and I solved it eventually. The trouble is I forget how I solved it, I just remember I had a hell of a time doing it. And this time I have a 1300 line program! I...
hozac is right, using arrays will be much easier. Read the information at the link he showed you and then try this:
$fields = array("field1value","field2value",...etc);
$num = 1;
foreach ($fields as $field) {
echo "<p> $stoixeia<b> </b><b>$num</b>
<input...
Nope, but the mysql_connect statement returns simply the number 1. The mysql_select_db statement then generates Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource...
Not sure what to make of that... I assume 1 will never === FALSE so it should be valid right? Celia
Here's the code:
mysql_connect($database['hostname'],$database['username'],$database['password']) || die (error("Could not connect to database: ".mysql_error(),1));
mysql_select_db($database['dbname']) || die (error("Could not select database: ".mysql_error(),1));
//select...
Well actually it's $database['dbname'] but you get the idea. My sql result resource links are not working either, however, which leads me to beleive it's not connecting properly and just not generating errors... Oh well *sigh* I'll get to the bottom of this. Celia
$db = mysql_connect(hostname,username,password);
mysql_select_db(db_name,$db);
produces the error "invalid mysql link-identifer" or something to that tune. The same happens in mysql_query("query",$db);
All the params were correct, and I'm certain itts connecting because it...
Ok I find this handy little function that returns the difference in minutes from GMT. I run it tho and I get 420, i.e 7 hours. I'm 8 hours off GMT (PST). So I change the time zone on my computer to GMT and run the program again. -60. Wierd, so I just need to add 60 to it for some reason. I set...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.