Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6083221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:22:39+00:00 2026-05-23T11:22:39+00:00

SELECT * FROM table_name WHERE date > 1309110123 How to do this in Phpcassa?

  • 0

SELECT * FROM table_name WHERE date > 1309110123

How to do this in Phpcassa?
I think there must be some way to modify this:

$column_family = new ColumnFamily($conn, 'Indexed1');
$index_exp = CassandraUtil::create_index_expression('birthdate', 1984);
$index_clause = CassandraUtil::create_index_clause(array($index_exp));
$rows = $column_family->get_indexed_slices($index_clause);
// returns an Iterator over:
//    array('winston smith' => array('birthdate' => 1984))

foreach($rows as $key => $columns) {
    // Do stuff with $key and $columns
    Print_r($columns)
}

Anyone an idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:22:40+00:00Added an answer on May 23, 2026 at 11:22 am

    I would suggest an alternate approach to what you have above. The easiest way is to store a record of your row key in another row, as a column, as such:

    $date = new DateTime();
    $cf = new ColumnFamily(getCassandraConnection(), 'foobar');
    $cf->insert('row1' => array('foo' => 'bar'));
    $cf->insert('all_rows' => array($date->getTimestamp() => 'row1');
    

    Now, when you want to do a select, like you have done above, using PHPCASSA, you can simply do a get with column_start / column_end:

    $newerResults = $cf->get('all_rows', $columns=null, $column_start=1309110123);
    

    In the case of birthdates, as ugly as it seems from an RDBMS world, create a new column in a row for ‘user_birthdates’ where each columname is birthday:uuid to keep things unique.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my php code $sql=SELECT * FROM table_name WHERE FROM_UNIXTIME(date, '%Y') = $q
When using this SQL query: Select * from table_name what happens if the name
I written a query in my sql like this: select * from table_name order
I have two select queries: SELECT MONTH(date) AS month, count(DISTINCT ip) FROM table_name WHERE
When we execute select count(*) from table_name it returns the number of rows. What
For example, mysql quote table name using SELECT * FROM `table_name`; notice the `
Hey guys, I created a list for fixtures. $result = mysql_query(SELECT date FROM .TBL_FIXTURES.
I want to select data from following table group by weeks Date Product Name
SELECT id FROM table_name tkn1, (SELECT id, ROWNUM rnum FROM table_name WHERE PROCS_DT is
I have query like this SELECT AVAILABILITY_DATE_TIME FROM APPT_PROVIDER_AVAILABILITY WHERE AVAILABILITY_DATE_TIME between @START_DATE AND

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.