if you really need to do random numbers with a lot of characters ....
just do a loop it's slow, but it works
exemple in your case :
$value=strval(rand(1,9)); //because you need 1 and not 0 for the first
for ($i=0;$i<7;$i++) $value.=strval(rand(0,9));
echo $value;
this way you can even get...
also, instead of using explode, use getimagesize (see PHP docs for more about it)
cause right now if you try to upload a file name photo.old.jpg, it will take .old as the extension ...
Khaldryck
Programmer at the University of Brussel (Belgium)
i have been assigned a new way of working, but have no idea how to do it.
i was accessing a DB using ODBC, but now i must do it using the COM functions to access it through OLEDB.
anyone can help me ? Khaldryck
Programmer at the University of Brussel (Belgium)
simple enough.
let's show it by an exemple
$dbname="name_of_your_odbc_datasource";
$dbuser="login_to_the_database";
$dbpass="password";
//first you have to create a connection
$conn=odbc_connect($db,$dbuser,$dbpass);
//now you can create query and access the...
to hide the variable to the user, you must either use global variables (with session or cookies)
or use a form and submit the variable by the method post.
Khaldryck
Programmer at the University of Brussel (Belgium)
you just have to create to connection, one for each database.
ex:
$conn=mysql_connect("database1","user","pass");
$conn2=mysql_connect("database2","user2","pass2");
then, as you need to query one databse or the other, you just use the...
2 ways of doing it, depending on your database program.
the standard :
select * from table where condition limit 1
or something like that.
i don't know for sure the syntax of the limit
if you're using microsoft access then limit won't work
you have to use aquery like this one :
select top 1 *...
the way tp connect an Access database is through odbc.
then you can use the obcd functions of php to read the records from the database and write them in the MySQL database.
if you don't know how to declare an access database, just reply this thread, and i'll tell you how to make it.
OK, ypur problem is that you have a variable called $LinkName that is undefined in file B.
for you query to succeed, you have to pass this variable from one page to the other.
either using the session object, or by referencing it on the adress.
here is an exemple for both case:
case 1...
you should check in your php.ini file if the SID is defined.
i got that problem, and saw that in fact it was called PHPSESSID instead of SID.
just change that line in the ini file and that should work.
on VMS RDBMS, i used something like this :<br><br>SELECT DISTINCT user.user_id FROM users <br>ORDER BY user.date_of_entry DESC<br>LIMIT TO 50 ROWS;<br><br>try it, i don't know if it works on microsoft SQLs<br>since there are lot of things we cannot do with microsoft<br><br>let me know if it worked
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.