Jump to content

KevBrad

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

KevBrad's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Silly me. Thank you very much. SOLVED.
  2. Simple question but canot fiind the answer. In the database query statement mssql_query() , there is an option to include a batch_size value (int) however it is not stated anywhere on the php.net site (http://uk.php.net/mssql_query) what that value is, i.e. Bytes, KiloBytes, MegaBytes etc.? What is it?
  3. This has now been solved. My syntax was incorrect.
  4. Hi, I predominantly use PHP with MySQL but have recently been needed to interact with MS SQL database for a client. I can connect to the server and run sp_databases and sp_tables to determin the higher structure however if I try to execute a simple SELECT command I run into errors. For example; $link = mssql_connect("server_name","username","password"); $sql = "SELECT * FROM database_name.table_name;"; $res = mssql_query($sql, $link); for($i=0; $i<mssql_num_fields($res, $link); $i++) { $field = mssql_fetch_field($res, $i); echo $field->name." | ".$field->type."<br />"; } I get 3 error codes, the first being the most important which is "Invalid Object Name:...". I know this is an SQL error but I cannot seem to find the correct code to output anything. My goal is to first obtain the structure of the database, tables, columns and then pursue retrieving individual records. Where am I going wrong?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.