Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Khaldryck

  1. Khaldryck

    How can I generate a random number between 10000000 and 99999999?

    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...
  2. Khaldryck

    is this code can upload images??

    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)
  3. Khaldryck

    accessing a database through OLEDB using COM functions?

    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)
  4. Khaldryck

    Connect to MS ACCESS db through ODBC

    simple enough. let's show it by an exemple $dbname=&quot;name_of_your_odbc_datasource&quot;; $dbuser=&quot;login_to_the_database&quot;; $dbpass=&quot;password&quot;; //first you have to create a connection $conn=odbc_connect($db,$dbuser,$dbpass); //now you can create query and access the...
  5. Khaldryck

    Linking between pages

    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)
  6. Khaldryck

    querying 2 databases using MYSQL and PHP

    you just have to create to connection, one for each database. ex: $conn=mysql_connect(&quot;database1&quot;,&quot;user&quot;,&quot;pass&quot;); $conn2=mysql_connect(&quot;database2&quot;,&quot;user2&quot;,&quot;pass2&quot;); then, as you need to query one databse or the other, you just use the...
  7. Khaldryck

    Select first record from database

    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 *...
  8. Khaldryck

    How to make a Database connection with Microsoft Access in PHP ??

    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.
  9. Khaldryck

    How can I do this?

    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...
  10. Khaldryck

    PHP4 + PHPLIB on WIndows

    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.
  11. Khaldryck

    free PHP hosting

    www.nexen.net
  12. Khaldryck

    XML Balanced Tag Alternative???

    indeed, when you have tags with no value in them, you can shortcut it that way so <code><value></value></code> is the same that <code><value/></code>
  13. Khaldryck

    Selecting last 50 entries

    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

Part and Inventory Search

Back
Top